diff options
Diffstat (limited to 'fs/fifo.c')
-rw-r--r-- | fs/fifo.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -11,6 +11,7 @@ #include <linux/mm.h> #include <linux/malloc.h> +#include <linux/smp_lock.h> static void wait_for_partner(struct inode* inode, unsigned int* cnt) { @@ -32,6 +33,7 @@ static int fifo_open(struct inode *inode, struct file *filp) int ret; ret = -ERESTARTSYS; + lock_kernel(); if (down_interruptible(PIPE_SEM(*inode))) goto err_nolock_nocleanup; @@ -114,6 +116,7 @@ static int fifo_open(struct inode *inode, struct file *filp) /* Ok! */ up(PIPE_SEM(*inode)); + unlock_kernel(); return 0; err_rd: @@ -140,6 +143,7 @@ err_nocleanup: up(PIPE_SEM(*inode)); err_nolock_nocleanup: + unlock_kernel(); return ret; } |