[PATCH v6 37/37] ntfs: report attribute move removal and cleanup failures
From: Xuewen Wang
Date: Wed Nov 18 2026 - 04:12:43 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 v6:
Add reporting to the standalone attribute-move fix in this final patch.
Report after destination context cleanup and keep separate source and
cleanup failures.
Validation:
- Compiled and linked the NTFS module object with W=1 at this stage.
- Eight controlled attribute-move cases passed for this stage,
including source removal and independent destination cleanup failure.
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 eae88b45d05e..c7e32ef15135 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -3739,11 +3739,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