aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pipe.c')
-rw-r--r--fs/pipe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/pipe.c b/fs/pipe.c
index e2fc5ccb0d49..39bdec06fe2b 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -55,7 +55,7 @@ unsigned int pipe_min_size = PAGE_SIZE;
55 55
56static void pipe_lock_nested(struct pipe_inode_info *pipe, int subclass) 56static void pipe_lock_nested(struct pipe_inode_info *pipe, int subclass)
57{ 57{
58 if (pipe->inode) 58 if (pipe->files)
59 mutex_lock_nested(&pipe->mutex, subclass); 59 mutex_lock_nested(&pipe->mutex, subclass);
60} 60}
61 61
@@ -70,7 +70,7 @@ EXPORT_SYMBOL(pipe_lock);
70 70
71void pipe_unlock(struct pipe_inode_info *pipe) 71void pipe_unlock(struct pipe_inode_info *pipe)
72{ 72{
73 if (pipe->inode) 73 if (pipe->files)
74 mutex_unlock(&pipe->mutex); 74 mutex_unlock(&pipe->mutex);
75} 75}
76EXPORT_SYMBOL(pipe_unlock); 76EXPORT_SYMBOL(pipe_unlock);
@@ -785,7 +785,6 @@ struct pipe_inode_info * alloc_pipe_info(struct inode *inode)
785 if (pipe->bufs) { 785 if (pipe->bufs) {
786 init_waitqueue_head(&pipe->wait); 786 init_waitqueue_head(&pipe->wait);
787 pipe->r_counter = pipe->w_counter = 1; 787 pipe->r_counter = pipe->w_counter = 1;
788 pipe->inode = inode;
789 pipe->buffers = PIPE_DEF_BUFFERS; 788 pipe->buffers = PIPE_DEF_BUFFERS;
790 mutex_init(&pipe->mutex); 789 mutex_init(&pipe->mutex);
791 return pipe; 790 return pipe;