From: Dan Carpenter Date: Thu, 18 Aug 2011 14:16:05 +0000 (-0400) Subject: btrfs: unlock on error in btrfs_file_llseek() X-Git-Tag: v3.1-rc3~14^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9a4327ca1f45f82edad7dc0a4e52ce9316e0950c;p=~emulex%2Finfiniband.git 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 Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 658d66959ab..f7d9df7f3fd 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) } } - if (offset < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET)) - return -EINVAL; - if (offset > inode->i_sb->s_maxbytes) - return -EINVAL; + if (offset < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET)) { + ret = -EINVAL; + goto out; + } + if (offset > inode->i_sb->s_maxbytes) { + ret = -EINVAL; + goto out; + } /* Special lock needed here? */ if (offset != file->f_pos) {