NFS: Introduce struct nfs_removeargs+nfs_removeres

We need a common structure for setting up an unlink() rpc call in order to
fix the asynchronous unlink code.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust
2007-07-14 15:39:57 -04:00
parent 3062c532ad
commit 4fdc17b2a7
7 changed files with 99 additions and 64 deletions

View File

@ -1435,7 +1435,7 @@ out:
/*
* Encode REMOVE request
*/
static int nfs4_xdr_enc_remove(struct rpc_rqst *req, __be32 *p, const struct nfs4_remove_arg *args)
static int nfs4_xdr_enc_remove(struct rpc_rqst *req, __be32 *p, const struct nfs_removeargs *args)
{
struct xdr_stream xdr;
struct compound_hdr hdr = {
@ -1447,7 +1447,7 @@ static int nfs4_xdr_enc_remove(struct rpc_rqst *req, __be32 *p, const struct nfs
encode_compound_hdr(&xdr, &hdr);
if ((status = encode_putfh(&xdr, args->fh)) != 0)
goto out;
if ((status = encode_remove(&xdr, args->name)) != 0)
if ((status = encode_remove(&xdr, &args->name)) != 0)
goto out;
status = encode_getfattr(&xdr, args->bitmask);
out:
@ -3835,7 +3835,7 @@ out:
/*
* Decode REMOVE response
*/
static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_remove_res *res)
static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, __be32 *p, struct nfs_removeres *res)
{
struct xdr_stream xdr;
struct compound_hdr hdr;
@ -3848,7 +3848,7 @@ static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, __be32 *p, struct nfs4_re
goto out;
if ((status = decode_remove(&xdr, &res->cinfo)) != 0)
goto out;
decode_getfattr(&xdr, res->dir_attr, res->server);
decode_getfattr(&xdr, &res->dir_attr, res->server);
out:
return status;
}