diff options
author | Peng Tao <tao.peng@primarydata.com> | 2014-06-13 11:02:25 -0400 |
---|---|---|
committer | Tom Haynes <loghyr@primarydata.com> | 2015-02-03 14:06:37 -0500 |
commit | 46a5ab4754cad6aeefd96feae8ba65db8655e1af (patch) | |
tree | 3f9c1ea1e51c00a50fa33d033766abe32bc031ef /fs/nfs/pagelist.c | |
parent | 2c4b131dea469e4df5bd59ccb490063b69e06155 (diff) |
nfs: allow to specify cred in nfs_initiate_pgio
so that flexfile layout client can pass in DS credential instead of
using user cred, which will be done in the next patch.
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 35a2626a6922..c4d175829880 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -597,14 +597,14 @@ static void nfs_pgio_prepare(struct rpc_task *task, void *calldata) | |||
597 | } | 597 | } |
598 | 598 | ||
599 | int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr, | 599 | int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr, |
600 | const struct nfs_rpc_ops *rpc_ops, | 600 | struct rpc_cred *cred, const struct nfs_rpc_ops *rpc_ops, |
601 | const struct rpc_call_ops *call_ops, int how, int flags) | 601 | const struct rpc_call_ops *call_ops, int how, int flags) |
602 | { | 602 | { |
603 | struct rpc_task *task; | 603 | struct rpc_task *task; |
604 | struct rpc_message msg = { | 604 | struct rpc_message msg = { |
605 | .rpc_argp = &hdr->args, | 605 | .rpc_argp = &hdr->args, |
606 | .rpc_resp = &hdr->res, | 606 | .rpc_resp = &hdr->res, |
607 | .rpc_cred = hdr->cred, | 607 | .rpc_cred = cred, |
608 | }; | 608 | }; |
609 | struct rpc_task_setup task_setup_data = { | 609 | struct rpc_task_setup task_setup_data = { |
610 | .rpc_client = clnt, | 610 | .rpc_client = clnt, |
@@ -793,7 +793,9 @@ static int nfs_generic_pg_pgios(struct nfs_pageio_descriptor *desc) | |||
793 | ret = nfs_generic_pgio(desc, hdr); | 793 | ret = nfs_generic_pgio(desc, hdr); |
794 | if (ret == 0) | 794 | if (ret == 0) |
795 | ret = nfs_initiate_pgio(NFS_CLIENT(hdr->inode), | 795 | ret = nfs_initiate_pgio(NFS_CLIENT(hdr->inode), |
796 | hdr, NFS_PROTO(hdr->inode), | 796 | hdr, |
797 | hdr->cred, | ||
798 | NFS_PROTO(hdr->inode), | ||
797 | desc->pg_rpc_callops, | 799 | desc->pg_rpc_callops, |
798 | desc->pg_ioflags, 0); | 800 | desc->pg_ioflags, 0); |
799 | return ret; | 801 | return ret; |