diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-21 02:32:24 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:00 -0400 |
commit | 72b0d9aacb89f3759931ec440e1b535671145bb4 (patch) | |
tree | 65b5d6166912b1c406fad596e06138d60cf3b8ff /fs/pipe.c | |
parent | ba5bb147330a8737b6b5a812cc774c79c070704b (diff) | |
download | op-kernel-dev-72b0d9aacb89f3759931ec440e1b535671145bb4.zip op-kernel-dev-72b0d9aacb89f3759931ec440e1b535671145bb4.tar.gz |
pipe: don't use ->i_mutex
now it can be done - put mutex into pipe_inode_info, use it instead
of ->i_mutex
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -56,7 +56,7 @@ unsigned int pipe_min_size = PAGE_SIZE; static void pipe_lock_nested(struct pipe_inode_info *pipe, int subclass) { if (pipe->inode) - mutex_lock_nested(&pipe->inode->i_mutex, subclass); + mutex_lock_nested(&pipe->mutex, subclass); } void pipe_lock(struct pipe_inode_info *pipe) @@ -71,7 +71,7 @@ EXPORT_SYMBOL(pipe_lock); void pipe_unlock(struct pipe_inode_info *pipe) { if (pipe->inode) - mutex_unlock(&pipe->inode->i_mutex); + mutex_unlock(&pipe->mutex); } EXPORT_SYMBOL(pipe_unlock); @@ -777,6 +777,7 @@ struct pipe_inode_info * alloc_pipe_info(struct inode *inode) pipe->r_counter = pipe->w_counter = 1; pipe->inode = inode; pipe->buffers = PIPE_DEF_BUFFERS; + mutex_init(&pipe->mutex); return pipe; } kfree(pipe); |