diff options
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 4205ba752d40..89da56a58b63 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -2425,20 +2425,7 @@ static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int whence) | |||
2425 | } | 2425 | } |
2426 | } | 2426 | } |
2427 | 2427 | ||
2428 | if (offset < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET)) { | 2428 | offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes); |
2429 | offset = -EINVAL; | ||
2430 | goto out; | ||
2431 | } | ||
2432 | if (offset > inode->i_sb->s_maxbytes) { | ||
2433 | offset = -EINVAL; | ||
2434 | goto out; | ||
2435 | } | ||
2436 | |||
2437 | /* Special lock needed here? */ | ||
2438 | if (offset != file->f_pos) { | ||
2439 | file->f_pos = offset; | ||
2440 | file->f_version = 0; | ||
2441 | } | ||
2442 | out: | 2429 | out: |
2443 | mutex_unlock(&inode->i_mutex); | 2430 | mutex_unlock(&inode->i_mutex); |
2444 | return offset; | 2431 | return offset; |