diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-30 05:41:25 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-04-05 15:32:33 -0400 |
commit | 85a770a8889035625466a4cfb1393cd7d2ffd165 (patch) | |
tree | a860f3d7a95ad083863a1b55394f31f3b1b6f133 /fs | |
parent | 11e9b49b7fa056bfc00a56de8956d1d5fe8b84ea (diff) |
9p: return on mutex_lock_interruptible()
If "err" is -EINTR here the original code calls mutex_unlock() and then
returns, but it should just return directly.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/vfs_dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index d8a3afe4ff72..bbe00cf799fa 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c | |||
@@ -130,6 +130,8 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
130 | rdir = (struct p9_rdir *) fid->rdir; | 130 | rdir = (struct p9_rdir *) fid->rdir; |
131 | 131 | ||
132 | err = mutex_lock_interruptible(&rdir->mutex); | 132 | err = mutex_lock_interruptible(&rdir->mutex); |
133 | if (err) | ||
134 | return err; | ||
133 | while (err == 0) { | 135 | while (err == 0) { |
134 | if (rdir->tail == rdir->head) { | 136 | if (rdir->tail == rdir->head) { |
135 | err = v9fs_file_readn(filp, rdir->buf, NULL, | 137 | err = v9fs_file_readn(filp, rdir->buf, NULL, |