[PATCH] ntfs3: set .getattr in ntfs_link_inode_operations
From: koraynilay
Date: Sat Oct 31 2026 - 20:23:05 EST
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
Signed-off-by: koraynilay <koray.fra@xxxxxxxxx>
---
Thanks
fs/ntfs3/inode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 8adbdf1a7d11..0cc46c184ac6 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -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
--
2.56.0