aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 8a38714f1d92..41000f223ca4 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2646,17 +2646,7 @@ static loff_t ocfs2_file_llseek(struct file *file, loff_t offset, int whence)
2646 goto out; 2646 goto out;
2647 } 2647 }
2648 2648
2649 if (offset < 0 && !(file->f_mode & FMODE_UNSIGNED_OFFSET)) 2649 offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
2650 ret = -EINVAL;
2651 if (!ret && offset > inode->i_sb->s_maxbytes)
2652 ret = -EINVAL;
2653 if (ret)
2654 goto out;
2655
2656 if (offset != file->f_pos) {
2657 file->f_pos = offset;
2658 file->f_version = 0;
2659 }
2660 2650
2661out: 2651out:
2662 mutex_unlock(&inode->i_mutex); 2652 mutex_unlock(&inode->i_mutex);