diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-05-20 10:43:47 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-06-06 16:24:35 -0400 |
commit | 9556000d8c5af9fb3a5f0abd97c632108f3acfb1 (patch) | |
tree | 8e8015dc4682812a492b3d19d3b83a4cd610c67a | |
parent | 6ab59344d9796eaf1312c12cfa8ad08328d50fde (diff) |
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>
-rw-r--r-- | fs/nfs/nfs4proc.c | 1 | ||||
-rw-r--r-- | fs/nfs/pnfs.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a6b8db43ce3f..a8d035e2c53b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -6452,6 +6452,7 @@ int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp) | |||
6452 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LAYOUTRETURN], | 6452 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LAYOUTRETURN], |
6453 | .rpc_argp = &lrp->args, | 6453 | .rpc_argp = &lrp->args, |
6454 | .rpc_resp = &lrp->res, | 6454 | .rpc_resp = &lrp->res, |
6455 | .rpc_cred = lrp->cred, | ||
6455 | }; | 6456 | }; |
6456 | struct rpc_task_setup task_setup_data = { | 6457 | struct rpc_task_setup task_setup_data = { |
6457 | .rpc_client = lrp->clp->cl_rpcclient, | 6458 | .rpc_client = lrp->clp->cl_rpcclient, |
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 2f86115e6ad0..89ca75f25721 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -861,6 +861,7 @@ _pnfs_return_layout(struct inode *ino) | |||
861 | lrp->args.inode = ino; | 861 | lrp->args.inode = ino; |
862 | lrp->args.layout = lo; | 862 | lrp->args.layout = lo; |
863 | lrp->clp = NFS_SERVER(ino)->nfs_client; | 863 | lrp->clp = NFS_SERVER(ino)->nfs_client; |
864 | lrp->cred = lo->plh_lc_cred; | ||
864 | 865 | ||
865 | status = nfs4_proc_layoutreturn(lrp); | 866 | status = nfs4_proc_layoutreturn(lrp); |
866 | out: | 867 | out: |