Commit 6ab59344d9796eaf1312c12cfa8ad08328d50fde

Authored by Trond Myklebust
1 parent eb54d43707

NFSv4.1: Ensure that layoutget is called using the layout credential

Ensure that we use the same credential for layoutget, layoutcommit and
layoutreturn.

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

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

... ... @@ -6348,6 +6348,7 @@
6348 6348 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LAYOUTGET],
6349 6349 .rpc_argp = &lgp->args,
6350 6350 .rpc_resp = &lgp->res,
  6351 + .rpc_cred = lgp->cred,
6351 6352 };
6352 6353 struct rpc_task_setup task_setup_data = {
6353 6354 .rpc_client = server->client,
... ... @@ -766,6 +766,7 @@
766 766 lgp->args.inode = ino;
767 767 lgp->args.ctx = get_nfs_open_context(ctx);
768 768 lgp->gfp_flags = gfp_flags;
  769 + lgp->cred = lo->plh_lc_cred;
769 770  
770 771 /* Synchronously retrieve layout information from server and
771 772 * store in lseg.
include/linux/nfs_xdr.h
... ... @@ -246,6 +246,7 @@
246 246 struct nfs4_layoutget {
247 247 struct nfs4_layoutget_args args;
248 248 struct nfs4_layoutget_res res;
  249 + struct rpc_cred *cred;
249 250 gfp_t gfp_flags;
250 251 };
251 252