mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs/ntfs3: advertise nodump in the statx attributes mask
@ 2026-11-03  1:04 Hungyu Lin
  0 siblings, 0 replies; only message in thread
From: Hungyu Lin @ 2026-11-03  1:04 UTC (permalink / raw)
  To: Konstantin Komarov; +Cc: ntfs3, linux-kernel, Hungyu Lin

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 <dennylin0707@gmail.com>
---
 fs/ntfs3/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index 1624f9b014e0..d5c87d608bd9 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -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);
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-03  1:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03  1:04 [PATCH] fs/ntfs3: advertise nodump in the statx attributes mask Hungyu Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®