[PATCH v7 31/31] ntfs: report attribute move removal and cleanup failures

From: Xuewen Wang

Date: Fri Dec 04 2026 - 02:53:28 EST


From: Xuewen Wang <wangxuewen@xxxxxxxxxx>

The earlier attribute-move fix checks source removal and destination
cleanup with the pre-existing volume error bit and log messages. Keep
that fix independent of the new reporting helpers for backporting.

Replace its volume-bit updates with file metadata reports. Report the
source removal and an independent destination cleanup failure after
releasing the destination search context, preserving the return errno
and both diagnostics.

Reviewed-by: Baolin Liu <liubaolin@xxxxxxxxxx>
Signed-off-by: Xuewen Wang <wangxuewen@xxxxxxxxxx>
---
Changes in v7:
Rebase onto ntfs-next 660cb7022966; retain the v6 logical change.

fs/ntfs/attrib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index 1a76ea32e157..d32016b966cb 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -3837,11 +3837,11 @@ int ntfs_attr_record_move_to(struct ntfs_attr_search_ctx *ctx, struct ntfs_inode
put_err_out:
ntfs_attr_put_search_ctx(nctx);
if (remove_err) {
- NVolSetErrors(ni->vol);
+ ntfs_report_file_metadata_error(VFS_I(ni), remove_err);
ntfs_error(sb, "Failed to remove source attribute record");
}
if (cleanup_err) {
- NVolSetErrors(ni->vol);
+ ntfs_report_file_metadata_error(VFS_I(ni), cleanup_err);
ntfs_error(sb, "Failed to remove destination attribute copy");
}
return err;
--
2.51.0