Skip to content

Commit c3e1034

Browse files
committed
vfs_getattr on < 3.9
int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) https://elixir.bootlin.com/linux/v3.8/source/fs/stat.c#L40 for tiann#2757
1 parent dfbf9f1 commit c3e1034

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/throne_tracker.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,10 @@ FILLDIR_RETURN_TYPE user_data_actor(MY_ACTOR_CTX_ARG, const char *name,
289289
struct kstat stat;
290290
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) || defined(KSU_HAS_NEW_VFS_GETATTR)
291291
err = vfs_getattr(&path, &stat, STATX_UID, AT_STATX_SYNC_AS_STAT);
292-
#else
292+
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
293293
err = vfs_getattr(&path, &stat);
294+
#else
295+
err = vfs_getattr(path.mnt, path.dentry, &stat);
294296
#endif
295297
path_put(&path);
296298

0 commit comments

Comments
 (0)