aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 0ad2b95fca12..de3dc98f4e8f 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1268,8 +1268,7 @@ xfs_seek_data(
1268 } 1268 }
1269 1269
1270out: 1270out:
1271 if (offset != file->f_pos) 1271 offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
1272 file->f_pos = offset;
1273 1272
1274out_unlock: 1273out_unlock:
1275 xfs_iunlock_map_shared(ip, lock); 1274 xfs_iunlock_map_shared(ip, lock);
@@ -1377,8 +1376,7 @@ out:
1377 * situation in particular. 1376 * situation in particular.
1378 */ 1377 */
1379 offset = min_t(loff_t, offset, isize); 1378 offset = min_t(loff_t, offset, isize);
1380 if (offset != file->f_pos) 1379 offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
1381 file->f_pos = offset;
1382 1380
1383out_unlock: 1381out_unlock:
1384 xfs_iunlock_map_shared(ip, lock); 1382 xfs_iunlock_map_shared(ip, lock);