aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fifo.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-07 12:16:35 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-07 12:16:35 -0500
commitd19e9974084b4024abcfcfc9d8676c90d26994bb (patch)
tree4f97c70129e74730a57cc7988877b2243e1d3a93 /fs/fifo.c
parentd11d9b2dd2c43dd99a491df8a83ae28401db0044 (diff)
Simplify fifo_open() locking logic
We don't do interruptible waits for the pipe mutex anywhere else any more either, so don't do it in fifo_open() either. Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fifo.c')
-rw-r--r--fs/fifo.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/fifo.c b/fs/fifo.c
index 923371b753ab..d13fcd3ec803 100644
--- a/fs/fifo.c
+++ b/fs/fifo.c
@@ -34,10 +34,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
34{ 34{
35 int ret; 35 int ret;
36 36
37 ret = -ERESTARTSYS; 37 mutex_lock(PIPE_MUTEX(*inode));
38 if (mutex_lock_interruptible(PIPE_MUTEX(*inode)))
39 goto err_nolock_nocleanup;
40
41 if (!inode->i_pipe) { 38 if (!inode->i_pipe) {
42 ret = -ENOMEM; 39 ret = -ENOMEM;
43 if(!pipe_new(inode)) 40 if(!pipe_new(inode))
@@ -140,8 +137,6 @@ err:
140 137
141err_nocleanup: 138err_nocleanup:
142 mutex_unlock(PIPE_MUTEX(*inode)); 139 mutex_unlock(PIPE_MUTEX(*inode));
143
144err_nolock_nocleanup:
145 return ret; 140 return ret;
146} 141}
147 142