aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/nfs4proc.c5
-rw-r--r--fs/nfs/nfs4xdr.c6
-rw-r--r--include/linux/nfs_xdr.h5
3 files changed, 13 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 62bbe25d9423..e08edc99faac 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3722,10 +3722,13 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
3722 .page = page, 3722 .page = page,
3723 .bitmask = bitmask, 3723 .bitmask = bitmask,
3724 }; 3724 };
3725 struct nfs4_fs_locations_res res = {
3726 .fs_locations = fs_locations,
3727 };
3725 struct rpc_message msg = { 3728 struct rpc_message msg = {
3726 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS], 3729 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS],
3727 .rpc_argp = &args, 3730 .rpc_argp = &args,
3728 .rpc_resp = fs_locations, 3731 .rpc_resp = &res,
3729 }; 3732 };
3730 int status; 3733 int status;
3731 3734
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index aa350d5bf207..e448e33b4d05 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4504,7 +4504,8 @@ out:
4504/* 4504/*
4505 * FS_LOCATIONS request 4505 * FS_LOCATIONS request
4506 */ 4506 */
4507static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs4_fs_locations *res) 4507static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p,
4508 struct nfs4_fs_locations_res *res)
4508{ 4509{
4509 struct xdr_stream xdr; 4510 struct xdr_stream xdr;
4510 struct compound_hdr hdr; 4511 struct compound_hdr hdr;
@@ -4519,7 +4520,8 @@ static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs
4519 if ((status = decode_lookup(&xdr)) != 0) 4520 if ((status = decode_lookup(&xdr)) != 0)
4520 goto out; 4521 goto out;
4521 xdr_enter_page(&xdr, PAGE_SIZE); 4522 xdr_enter_page(&xdr, PAGE_SIZE);
4522 status = decode_getfattr(&xdr, &res->fattr, res->server); 4523 status = decode_getfattr(&xdr, &res->fs_locations->fattr,
4524 res->fs_locations->server);
4523out: 4525out:
4524 return status; 4526 return status;
4525} 4527}
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 0f2dc8f4cc36..d837f10c49ef 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -867,6 +867,11 @@ struct nfs4_fs_locations_arg {
867 struct nfs4_sequence_args seq_args; 867 struct nfs4_sequence_args seq_args;
868}; 868};
869 869
870struct nfs4_fs_locations_res {
871 struct nfs4_fs_locations *fs_locations;
872 struct nfs4_sequence_res seq_res;
873};
874
870#endif /* CONFIG_NFS_V4 */ 875#endif /* CONFIG_NFS_V4 */
871 876
872struct nfs_page; 877struct nfs_page;