Skip to contentSkip to conversation

fs/ntfs3: advertise nodump in the statx attributes mask

PATCH New Hungyu Lin 1 participant 1 message Nov 3 NTFS3 filesystem

lore
Share & tools
lore

Hungyu Lin

author
#0 lore raw

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")
---
 fs/ntfs3/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/file.c +1 -1
index 1624f9b014e0..d5c87d608bd9 100644
@@ -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