Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22958463 authored by Benny Halevy's avatar Benny Halevy
Browse files

nfs41: use nfs4_fs_locations_res



In preparation for nfs41 sequence processing.

Signed-off-by: default avatarAndy Admason <andros@netapp.com>
[find nfs4_fs_locations_res]
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 73c403a9
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -3722,10 +3722,13 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name,
		.page = page,
		.page = page,
		.bitmask = bitmask,
		.bitmask = bitmask,
	};
	};
	struct nfs4_fs_locations_res res = {
		.fs_locations = fs_locations,
	};
	struct rpc_message msg = {
	struct rpc_message msg = {
		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS],
		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS],
		.rpc_argp = &args,
		.rpc_argp = &args,
		.rpc_resp = fs_locations,
		.rpc_resp = &res,
	};
	};
	int status;
	int status;


+4 −2
Original line number Original line Diff line number Diff line
@@ -4504,7 +4504,8 @@ out:
/*
/*
 * FS_LOCATIONS request
 * FS_LOCATIONS request
 */
 */
static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs4_fs_locations *res)
static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p,
				     struct nfs4_fs_locations_res *res)
{
{
	struct xdr_stream xdr;
	struct xdr_stream xdr;
	struct compound_hdr hdr;
	struct compound_hdr hdr;
@@ -4519,7 +4520,8 @@ static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs
	if ((status = decode_lookup(&xdr)) != 0)
	if ((status = decode_lookup(&xdr)) != 0)
		goto out;
		goto out;
	xdr_enter_page(&xdr, PAGE_SIZE);
	xdr_enter_page(&xdr, PAGE_SIZE);
	status = decode_getfattr(&xdr, &res->fattr, res->server);
	status = decode_getfattr(&xdr, &res->fs_locations->fattr,
				 res->fs_locations->server);
out:
out:
	return status;
	return status;
}
}
+5 −0
Original line number Original line Diff line number Diff line
@@ -867,6 +867,11 @@ struct nfs4_fs_locations_arg {
	struct nfs4_sequence_args	seq_args;
	struct nfs4_sequence_args	seq_args;
};
};


struct nfs4_fs_locations_res {
	struct nfs4_fs_locations       *fs_locations;
	struct nfs4_sequence_res	seq_res;
};

#endif /* CONFIG_NFS_V4 */
#endif /* CONFIG_NFS_V4 */


struct nfs_page;
struct nfs_page;