diff options
| author | Jiangshan Yi <yijiangshan@kylinos.cn> | 2026-09-14 16:21:11 +0800 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-09-15 10:19:14 +0200 |
| commit | ce2b91bebc7bc0495fe3ad5ee47e4977fbb77fc5 (patch) | |
| tree | 2859310730a9727f06525015436a0727518141de | |
| parent | 14e379600d3e57ab0872b049c28cfe5ef519d439 (diff) | |
| download | linux-next-ce2b91bebc7bc0495fe3ad5ee47e4977fbb77fc5.tar.gz linux-next-ce2b91bebc7bc0495fe3ad5ee47e4977fbb77fc5.zip | |
xfs: remove duplicate INO1_WRITTEN check
Commit a23eca88448e ("xfs: fix exchange-range reflink flag clearing
issue with INO1_WRITTEN") duplicated commit b2d5a81dae38 ("xfs: fix
exchange-range reflink flag clearing issue with INO1_WRITTEN"), so
xmi_can_exchange_reflink_flags() ended up with two identical
XFS_EXCHMAPS_INO1_WRITTEN checks. The second one is dead code,
since the first one already returned false. Remove it.
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
| -rw-r--r-- | fs/xfs/libxfs/xfs_exchmaps.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/xfs/libxfs/xfs_exchmaps.c b/fs/xfs/libxfs/xfs_exchmaps.c index 49eda8d0994d..3efed37cb98a 100644 --- a/fs/xfs/libxfs/xfs_exchmaps.c +++ b/fs/xfs/libxfs/xfs_exchmaps.c @@ -969,16 +969,6 @@ xmi_can_exchange_reflink_flags( if (req->flags & XFS_EXCHMAPS_INO1_WRITTEN) return false; - /* - * The INO1_WRITTEN optimization can skip exchanging hole and - * unwritten mappings, which means we cannot guarantee that all - * shared extents actually moved to the other file. Clearing the - * reflink flag of an inode that still holds shared extents breaks - * the CoW write path, so refuse to exchange the flags in that case. - */ - if (req->flags & XFS_EXCHMAPS_INO1_WRITTEN) - return false; - if (hweight32(reflink_state) != 1) return false; if (req->startoff1 != 0 || req->startoff2 != 0) |
