diff options
author | Dan Carpenter <error27@gmail.com> | 2009-03-30 18:50:13 +0000 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2009-04-02 13:55:18 -0700 |
commit | 84a31107de6deee382e98b911e0fc7263427a7a8 (patch) | |
tree | 65cd1019d4fdc58fea85b801ce6cd7b123cc925f /fs | |
parent | fdc0359dc4769e463481a5376cb66f5c53b2868c (diff) |
fuse: fix fuse_file_lseek returning with lock held
upstream commit: 5291658d87ac1ae60418e79e7b6bad7d5f595e0c
This bug was found with smatch (http://repo.or.cz/w/smatch.git/). If
we return directly the inode->i_mutex lock doesn't get released.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index d9fdb7cec53..821d10f719b 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1465,7 +1465,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin) case SEEK_END: retval = fuse_update_attributes(inode, NULL, file, NULL); if (retval) - return retval; + goto exit; offset += i_size_read(inode); break; case SEEK_CUR: @@ -1479,6 +1479,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin) } retval = offset; } +exit: mutex_unlock(&inode->i_mutex); return retval; } |