]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/nfs/proc.c
Merge tag 'mac80211-for-net-2020-02-14' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / fs / nfs / proc.c
index 0451a094e89ee1364af21b8ad3de0d29b869338a..15c865cc837fa22bf9b3e015d4b96cb021c7c049 100644 (file)
@@ -152,14 +152,14 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
 }
 
 static int
-nfs_proc_lookup(struct inode *dir, const struct qstr *name,
+nfs_proc_lookup(struct inode *dir, struct dentry *dentry,
                struct nfs_fh *fhandle, struct nfs_fattr *fattr,
                struct nfs4_label *label)
 {
        struct nfs_diropargs    arg = {
                .fh             = NFS_FH(dir),
-               .name           = name->name,
-               .len            = name->len
+               .name           = dentry->d_name.name,
+               .len            = dentry->d_name.len
        };
        struct nfs_diropok      res = {
                .fh             = fhandle,
@@ -171,10 +171,15 @@ nfs_proc_lookup(struct inode *dir, const struct qstr *name,
                .rpc_resp       = &res,
        };
        int                     status;
+       unsigned short task_flags = 0;
 
-       dprintk("NFS call  lookup %s\n", name->name);
+       /* Is this is an attribute revalidation, subject to softreval? */
+       if (nfs_lookup_is_soft_revalidate(dentry))
+               task_flags |= RPC_TASK_TIMEOUT;
+
+       dprintk("NFS call  lookup %pd2\n", dentry);
        nfs_fattr_init(fattr);
-       status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
+       status = rpc_call_sync(NFS_CLIENT(dir), &msg, task_flags);
        dprintk("NFS reply lookup: %d\n", status);
        return status;
 }