]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nfs/inode.c
statx: Add a system call to make enhanced file info available
[karo-tx-linux.git] / fs / nfs / inode.c
index 5ca4d96b19421881c6b3b0fba493e605d6d70eeb..b5425315adccab5504e08abebea108e919e7f9f0 100644 (file)
@@ -703,9 +703,10 @@ static bool nfs_need_revalidate_inode(struct inode *inode)
        return false;
 }
 
-int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+int nfs_getattr(const struct path *path, struct kstat *stat,
+               u32 request_mask, unsigned int query_flags)
 {
-       struct inode *inode = d_inode(dentry);
+       struct inode *inode = d_inode(path->dentry);
        int need_atime = NFS_I(inode)->cache_validity & NFS_INO_INVALID_ATIME;
        int err = 0;
 
@@ -726,17 +727,17 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
         *  - NFS never sets MS_NOATIME or MS_NODIRATIME so there is
         *    no point in checking those.
         */
-       if ((mnt->mnt_flags & MNT_NOATIME) ||
-           ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))
+       if ((path->mnt->mnt_flags & MNT_NOATIME) ||
+           ((path->mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))
                need_atime = 0;
 
        if (need_atime || nfs_need_revalidate_inode(inode)) {
                struct nfs_server *server = NFS_SERVER(inode);
 
-               nfs_readdirplus_parent_cache_miss(dentry);
+               nfs_readdirplus_parent_cache_miss(path->dentry);
                err = __nfs_revalidate_inode(server, inode);
        } else
-               nfs_readdirplus_parent_cache_hit(dentry);
+               nfs_readdirplus_parent_cache_hit(path->dentry);
        if (!err) {
                generic_fillattr(inode, stat);
                stat->ino = nfs_compat_user_ino64(NFS_FILEID(inode));