Commit 4de40457 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] NFSv4 cleanups

 - Move the encoding/decoding of the actual COMPOUND XDR header out of
   encode_compound()/decode_compound().

 - Make each NFSv4 operation 'decode_' routine also take care of
   decoding its own header, and checking it for correctness.
   Also allows us to get rid of the 'nfserr' parameter...
parent a0952771
......@@ -648,7 +648,7 @@ nfs4_call_compound(struct nfs4_compound *cp, struct rpc_cred *cred, int flags)
{
int status;
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
.rpc_argp = cp,
.rpc_resp = cp,
.rpc_cred = cred,
......@@ -1112,7 +1112,7 @@ nfs4_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr
nfs4_setup_remove(cp, name, &up->cinfo);
nfs4_setup_getattr(cp, &up->attrs, bmres);
msg->rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND];
msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND];
msg->rpc_argp = cp;
msg->rpc_resp = cp;
return 0;
......@@ -1373,7 +1373,7 @@ nfs4_proc_read_setup(struct nfs_read_data *data, unsigned int count)
struct rpc_task *task = &data->task;
struct nfs4_compound *cp = &data->u.v4.compound;
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
.rpc_argp = cp,
.rpc_resp = cp,
.rpc_cred = data->cred,
......@@ -1417,7 +1417,7 @@ nfs4_proc_write_setup(struct nfs_write_data *data, unsigned int count, int how)
struct rpc_task *task = &data->task;
struct nfs4_compound *cp = &data->u.v4.compound;
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
.rpc_argp = cp,
.rpc_resp = cp,
.rpc_cred = data->cred,
......@@ -1468,7 +1468,7 @@ nfs4_proc_commit_setup(struct nfs_write_data *data, u64 start, u32 len, int how)
struct rpc_task *task = &data->task;
struct nfs4_compound *cp = &data->u.v4.compound;
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
.rpc_argp = cp,
.rpc_resp = cp,
.rpc_cred = data->cred,
......@@ -1523,7 +1523,7 @@ nfs4_proc_renew(struct nfs_server *server)
struct rpc_task *task;
struct nfs4_compound *cp;
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
};
rp = (struct renew_desc *) kmalloc(sizeof(*rp), GFP_KERNEL);
......
This diff is collapsed.
......@@ -196,6 +196,16 @@ enum open_delegation_type4 {
#define NFS4_MINOR_VERSION 0
#define NFS4_DEBUG 1
#ifdef __KERNEL__
/* Index of predefined Linux client operations */
enum {
NFSPROC4_CLNT_NULL = 0, /* Unused */
NFSPROC4_CLNT_COMPOUND, /* Soon to be unused */
};
#endif
#endif
/*
......
......@@ -488,7 +488,6 @@ struct nfs4_write {
struct nfs4_op {
u32 opnum;
u32 nfserr;
union {
struct nfs4_access access;
struct nfs4_close close;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment