mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
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: 495e90fa33 ("ntfs: update attrib operations")
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
8506a8031e
commit
3e38885ff6
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user