Skip to contentSkip to conversation

ntfs3: set .getattr in ntfs_link_inode_operations

PATCH New koraynilay 1 participant 1 message Nov 1 NTFS3 filesystem

lore
Share & tools
lore

koraynilay

author
#0 lore raw

PATCH 1/1 ntfs3: set .getattr in ntfs_link_inode_operations

When running stat (or calling statx() with AT_SYMLINK_NOFOLLOW) on a symlink, ntfs3 doesn't report btime, cluster size or any other file attribute because it falls back to generic_fillattr() without populating those fields.

Fix this by setting ntfs_link_inode_operations.getattr to ntfs_getattr().

Fixes 82cae269cfa9530 ("fs/ntfs3: Add initialization of super block")
Assisted-by Gemini:3.8-flash-high antigravity-cli-1.4.7

---
Thanks

 fs/ntfs3/inode.c | 1 +
 1 file changed, 1 insertion(+)
fs/ntfs3/inode.c +1 -0
index 8adbdf1a7d11..0cc46c184ac6 100644
@@ -2316,6 +2316,7 @@ static const char *ntfs_get_link(struct dentry *de, struct inode *inode,
 const struct inode_operations ntfs_link_inode_operations = {
 	.get_link	= ntfs_get_link,
 	.setattr	= ntfs_setattr,
+	.getattr	= ntfs_getattr,
 	.listxattr	= ntfs_listxattr,
 	.fileattr_get	= ntfs_fileattr_get,
 	.fileattr_set	= ntfs_fileattr_set,

base-commit: ee1cb3443cff5a800948b662756f75b17ca63fe2

Signature · 1 line
2.56.0