Commit 9556000d8c5af9fb3a5f0abd97c632108f3acfb1

Authored by Trond Myklebust
1 parent 6ab59344d9

NFSv4.1: Ensure that layoutreturn uses the correct credential

We need to use the same credential as was used for the layoutget
and/or layoutcommit operations.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

Showing 2 changed files with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -6452,6 +6452,7 @@
6452 6452 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LAYOUTRETURN],
6453 6453 .rpc_argp = &lrp->args,
6454 6454 .rpc_resp = &lrp->res,
  6455 + .rpc_cred = lrp->cred,
6455 6456 };
6456 6457 struct rpc_task_setup task_setup_data = {
6457 6458 .rpc_client = lrp->clp->cl_rpcclient,
... ... @@ -861,6 +861,7 @@
861 861 lrp->args.inode = ino;
862 862 lrp->args.layout = lo;
863 863 lrp->clp = NFS_SERVER(ino)->nfs_client;
  864 + lrp->cred = lo->plh_lc_cred;
864 865  
865 866 status = nfs4_proc_layoutreturn(lrp);
866 867 out: