Merge branch 'hpfs' from Mikulas Patocka
[firefly-linux-kernel-4.4.55.git] / fs / xfs / xfs_file.c
index 0ad2b95fca12fbd215b9eb63f84b2bd7c21b6609..de3dc98f4e8f76067c1e7d0ee4631a8638d87988 100644 (file)
@@ -1268,8 +1268,7 @@ xfs_seek_data(
        }
 
 out:
-       if (offset != file->f_pos)
-               file->f_pos = offset;
+       offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
 
 out_unlock:
        xfs_iunlock_map_shared(ip, lock);
@@ -1377,8 +1376,7 @@ out:
         * situation in particular.
         */
        offset = min_t(loff_t, offset, isize);
-       if (offset != file->f_pos)
-               file->f_pos = offset;
+       offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
 
 out_unlock:
        xfs_iunlock_map_shared(ip, lock);