Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263091
b: refs/heads/master
c: 9a4327c
h: refs/heads/master
i:
  263089: df35456
  263087: c23d13c
v: v3
  • Loading branch information
Dan Carpenter authored and Chris Mason committed Aug 18, 2011
1 parent 7922957 commit 8a7242f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb6db4e57632ba8589cc2f9fe1d0aa9116b87ab8
refs/heads/master: 9a4327ca1f45f82edad7dc0a4e52ce9316e0950c
12 changes: 8 additions & 4 deletions trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8a7242f

Please sign in to comment.