diff options
Diffstat (limited to 'fs/fifo.c')
-rw-r--r-- | fs/fifo.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -15,12 +15,13 @@ | |||
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/pipe_fs_i.h> | 16 | #include <linux/pipe_fs_i.h> |
17 | 17 | ||
18 | static void wait_for_partner(struct inode* inode, unsigned int* cnt) | 18 | static void wait_for_partner(struct inode* inode, unsigned int *cnt) |
19 | { | 19 | { |
20 | int cur = *cnt; | 20 | int cur = *cnt; |
21 | while(cur == *cnt) { | 21 | |
22 | pipe_wait(inode); | 22 | while (cur == *cnt) { |
23 | if(signal_pending(current)) | 23 | pipe_wait(inode->i_pipe); |
24 | if (signal_pending(current)) | ||
24 | break; | 25 | break; |
25 | } | 26 | } |
26 | } | 27 | } |
@@ -37,7 +38,8 @@ static int fifo_open(struct inode *inode, struct file *filp) | |||
37 | mutex_lock(PIPE_MUTEX(*inode)); | 38 | mutex_lock(PIPE_MUTEX(*inode)); |
38 | if (!inode->i_pipe) { | 39 | if (!inode->i_pipe) { |
39 | ret = -ENOMEM; | 40 | ret = -ENOMEM; |
40 | if(!pipe_new(inode)) | 41 | inode->i_pipe = alloc_pipe_info(inode); |
42 | if (!inode->i_pipe) | ||
41 | goto err_nocleanup; | 43 | goto err_nocleanup; |
42 | } | 44 | } |
43 | filp->f_version = 0; | 45 | filp->f_version = 0; |