summaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index 1ba717bd20c4..5552fa8b6e12 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -500,25 +500,18 @@ nfs_proc_readdir(struct dentry *dentry, const struct cred *cred,
500 .count = count, 500 .count = count,
501 .pages = pages, 501 .pages = pages,
502 }; 502 };
503 struct auth_cred acred = {
504 .cred = cred,
505 };
506 struct rpc_message msg = { 503 struct rpc_message msg = {
507 .rpc_proc = &nfs_procedures[NFSPROC_READDIR], 504 .rpc_proc = &nfs_procedures[NFSPROC_READDIR],
508 .rpc_argp = &arg, 505 .rpc_argp = &arg,
509 .rpc_cred = rpc_lookup_generic_cred(&acred, 506 .rpc_cred = cred,
510 0, GFP_NOFS),
511 }; 507 };
512 int status; 508 int status;
513 509
514 dprintk("NFS call readdir %d\n", (unsigned int)cookie); 510 dprintk("NFS call readdir %d\n", (unsigned int)cookie);
515 if (!msg.rpc_cred)
516 return -ENOMEM;
517 status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); 511 status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
518 512
519 nfs_invalidate_atime(dir); 513 nfs_invalidate_atime(dir);
520 514
521 put_rpccred(msg.rpc_cred);
522 dprintk("NFS reply readdir: %d\n", status); 515 dprintk("NFS reply readdir: %d\n", status);
523 return status; 516 return status;
524} 517}