aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-08-18 10:16:05 -0400
committerChris Mason <chris.mason@oracle.com>2011-08-18 10:16:05 -0400
commit9a4327ca1f45f82edad7dc0a4e52ce9316e0950c (patch)
tree322aa21ccdd9a9aaeac28ccdb08ae1e1b5baeb12 /fs
parentcb6db4e57632ba8589cc2f9fe1d0aa9116b87ab8 (diff)
btrfs: unlock on error in btrfs_file_llseek()
There were some unlocks on error missing in a recent patch to btrfs_file_llseek(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 658d66959abe..f7d9df7f3fdd 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1804,10 +1804,14 @@ static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int origin)
1804 } 1804 }
1805 } 1805 }
1806 1806
1807 if (offset < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET)) 1807 if (offset < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET)) {
1808 return -EINVAL; 1808 ret = -EINVAL;
1809 if (offset > inode->i_sb->s_maxbytes) 1809 goto out;
1810 return -EINVAL; 1810 }
1811 if (offset > inode->i_sb->s_maxbytes) {
1812 ret = -EINVAL;
1813 goto out;
1814 }
1811 1815
1812 /* Special lock needed here? */ 1816 /* Special lock needed here? */
1813 if (offset != file->f_pos) { 1817 if (offset != file->f_pos) {