]> git.baikalelectronics.ru Git - kernel.git/commit
fs: handle FIEMAP_FLAG_SYNC in fiemap_prep
authorChristoph Hellwig <hch@lst.de>
Sat, 23 May 2020 07:30:14 +0000 (09:30 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Jun 2020 03:16:55 +0000 (23:16 -0400)
commit3d1b0b1043d9b5a33e8bbe94c3a81dbd10c3c620
tree8babffcf81e916cbe3e5a21b7bace3a040c0e11d
parent11b9538e096696c82bc6f89dd0b36594fd7bdf65
fs: handle FIEMAP_FLAG_SYNC in fiemap_prep

By moving FIEMAP_FLAG_SYNC handling to fiemap_prep we ensure it is
handled once instead of duplicated, but can still be done under fs locks,
like xfs/iomap intended with its duplicate handling.  Also make sure the
error value of filemap_write_and_wait is propagated to user space.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Link: https://lore.kernel.org/r/20200523073016.2944131-8-hch@lst.de
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/btrfs/inode.c
fs/cifs/smb2ops.c
fs/ext4/extents.c
fs/ext4/ioctl.c
fs/f2fs/data.c
fs/ioctl.c
fs/iomap/fiemap.c
fs/nilfs2/inode.c
fs/ocfs2/extent_map.c
fs/overlayfs/inode.c