fs/ntfs3: advertise nodump in the statx attributes mask
PATCH 1/1 fs/ntfs3: advertise nodump in the statx attributes mask
ntfs_getattr() reports STATX_ATTR_NODUMP when ni->nodump is set, but omits the bit from attributes_mask. The returned mask therefore tells statx callers that the flag is unsupported even when attributes contains it. Callers that check both fields cannot recognize the nodump state.
Include STATX_ATTR_NODUMP in attributes_mask, whether the flag is set or clear, to describe the state already reported by ntfs_getattr().
Fixes 33f29fc7c67e ("fs/ntfs3: add fileattr support")
Signed-off-by Hungyu Lin <[email protected]>
--- fs/ntfs3/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/file.c +1 -1
@@ -295,7 +295,7 @@ int ntfs_getattr(const struct mnt_idmap *idmap, const struct path *path, stat->attributes |=STATX_ATTR_ENCRYPTED ; stat->attributes_mask |=STATX_ATTR_COMPRESSED |STATX_ATTR_ENCRYPTED | -STATX_ATTR_IMMUTABLE |STATX_ATTR_APPEND ; +STATX_ATTR_IMMUTABLE |STATX_ATTR_APPEND |STATX_ATTR_NODUMP ;generic_fillattr (idmap, request_mask, inode, stat);
Signature · 1 line
2.43.0