linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] NFSv4.1: Ensure that layoutget is called using the layout credential
@ 2013-05-20 17:17 Trond Myklebust
  2013-05-20 17:17 ` [PATCH 2/6] NFSv4.1: Ensure that layoutreturn uses the correct credential Trond Myklebust
  0 siblings, 1 reply; 9+ messages in thread
From: Trond Myklebust @ 2013-05-20 17:17 UTC (permalink / raw)
  To: linux-nfs

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

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
 fs/nfs/nfs4proc.c       | 1 +
 fs/nfs/pnfs.c           | 1 +
 include/linux/nfs_xdr.h | 1 +
 3 files changed, 3 insertions(+)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 8fbc100..a05397b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6348,6 +6348,7 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, gfp_t gfp_flags)
 		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LAYOUTGET],
 		.rpc_argp = &lgp->args,
 		.rpc_resp = &lgp->res,
+		.rpc_cred = lgp->cred,
 	};
 	struct rpc_task_setup task_setup_data = {
 		.rpc_client = server->client,
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index c5bd758e..2f86115 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -766,6 +766,7 @@ send_layoutget(struct pnfs_layout_hdr *lo,
 	lgp->args.inode = ino;
 	lgp->args.ctx = get_nfs_open_context(ctx);
 	lgp->gfp_flags = gfp_flags;
+	lgp->cred = lo->plh_lc_cred;
 
 	/* Synchronously retrieve layout information from server and
 	 * store in lseg.
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 104b62f..32c95d6 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -246,6 +246,7 @@ struct nfs4_layoutget_res {
 struct nfs4_layoutget {
 	struct nfs4_layoutget_args args;
 	struct nfs4_layoutget_res res;
+	struct rpc_cred *cred;
 	gfp_t gfp_flags;
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-05-20 21:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 17:17 [PATCH 1/6] NFSv4.1: Ensure that layoutget is called using the layout credential Trond Myklebust
2013-05-20 17:17 ` [PATCH 2/6] NFSv4.1: Ensure that layoutreturn uses the correct credential Trond Myklebust
2013-05-20 17:17   ` [PATCH 3/6] NFSv4.1: Ensure that reclaim_complete uses the right credential Trond Myklebust
2013-05-20 17:17     ` [PATCH 4/6] NFSv4.1: Ensure that test_stateid and free_stateid use correct credentials Trond Myklebust
2013-05-20 17:17       ` [PATCH 5/6] NFSv4.1: Use layout credentials for get_deviceinfo calls Trond Myklebust
2013-05-20 17:17         ` [PATCH 6/6] NFSv4.1: Enable state protection Trond Myklebust
2013-05-20 20:40           ` J. Bruce Fields
2013-05-20 21:10             ` Myklebust, Trond
2013-05-20 21:25               ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).