From 3e38885ff66c797fc90cf90ab94c372bb4386e84 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Wed, 7 Oct 2026 16:43:28 +0900 Subject: [PATCH] ntfs: sync attribute inode size after resize Internal attribute truncation bypasses truncate_setsize(), so successful resizes must update the attribute inode's i_size. Restrict the update to attribute inodes to keep KEEP_SIZE fallocate from changing a file's i_size. Fixes: 495e90fa3348 ("ntfs: update attrib operations") Signed-off-by: Namjae Jeon --- fs/ntfs/attrib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index 4df618abc4ef..07414a20b7de 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c @@ -5187,6 +5187,8 @@ int ntfs_attr_truncate_i_locked(struct ntfs_inode *ni, const s64 newsize, ni, newsize, locked_ni, false); } else err = ntfs_resident_attr_resize(ni, newsize, 0, holes); + if (!err && NInoAttr(ni)) + i_size_write(VFS_I(ni), newsize); ntfs_debug("Return status %d\n", err); return err; }