[PATCH v5 01/31] ntfs: propagate mapping-pairs update errors from inode writeback

From: Xuewen Wang

Date: Mon Nov 02 2026 - 02:36:08 EST


From: Xuewen Wang <wangxuewen@xxxxxxxxxx>

__ntfs_write_inode() overwrites a failed mapping-pairs update with the
result of syncing standard information. fsync() can then report success
while the mapping pairs remain dirty.

Check the update result after releasing the runlist lock and take the
existing error path. Preserve the errno and retry handling for ENOMEM.

Fixes: af0db57d4293 ("ntfs: update inode operations")
Signed-off-by: Xuewen Wang <wangxuewen@xxxxxxxxxx>
---
fs/ntfs/inode.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 206db4e99ef1..52e22022b4e7 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -2940,6 +2940,8 @@ int __ntfs_write_inode(struct inode *vi, int sync)
if (!err)
NInoClearRunlistDirty(ni);
up_write(&ni->runlist.lock);
+ if (err)
+ goto unm_err_out;
}

err = ntfs_inode_sync_standard_information(vi, m);