mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
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>
This commit is contained in:
parent
cb6db4e576
commit
9a4327ca1f
1 changed files with 8 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue