diff options
-rw-r--r-- | fs/btrfs/file.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 35cfc738f6b7..949212289c89 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -3422,10 +3422,8 @@ static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int whence) int ret; switch (whence) { - case SEEK_END: - case SEEK_CUR: - offset = generic_file_llseek(file, offset, whence); - goto out; + default: + return generic_file_llseek(file, offset, whence); case SEEK_DATA: case SEEK_HOLE: inode_lock_shared(inode); @@ -3436,9 +3434,7 @@ static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int whence) return ret; } - offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes); -out: - return offset; + return vfs_setpos(file, offset, inode->i_sb->s_maxbytes); } static int btrfs_file_open(struct inode *inode, struct file *filp) |