diff options
author | Christoph Hellwig <hch@lst.de> | 2020-04-03 12:59:54 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-04-12 13:03:14 -0700 |
commit | 0ad53aea83d0ad19d5392278e8e73f7d7730f2bc (patch) | |
tree | f43b41d70229e862b8d2dc86da39994bd5d26c62 | |
parent | a01a9b5662fbc088dd7c8a64123a0e3f3fdbba80 (diff) |
xfs: reflink should force the log out if mounted with wsyncxfs-5.7-merge_2020-04-12
Reflink should force the log out to disk if the filesystem was mounted
with wsync, the same as most other operations in xfs.
Fixes: 3fc9f5e409319 ("xfs: remove xfs_reflink_remap_range")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-rw-r--r-- | fs/xfs/xfs_file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 68e1cbb3cfcc..4b8bdecc3863 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1059,7 +1059,11 @@ xfs_file_remap_range( ret = xfs_reflink_update_dest(dest, pos_out + len, cowextsize, remap_flags); + if (ret) + goto out_unlock; + if (mp->m_flags & XFS_MOUNT_WSYNC) + xfs_log_force_inode(dest); out_unlock: xfs_reflink_remap_unlock(file_in, file_out); if (ret) |