diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 22:12:44 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 22:12:44 -0400 |
commit | 16e429596dec4d28e16812b3a9be27f18412c567 (patch) | |
tree | b11c0f3829ae1225794a3d1fca68a1878a87a46d /fs/nfs/nfs4xdr.c | |
parent | 6caf2c8276d371679a798058e8fdf49f5ff831a3 (diff) |
NFSv4: Add post-op attributes to nfs4_proc_remove()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 2a07755bd347..3ee3a1669d28 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -306,10 +306,12 @@ static int nfs_stat_to_errno(int); | |||
306 | decode_getfh_maxsz) | 306 | decode_getfh_maxsz) |
307 | #define NFS4_enc_remove_sz (compound_encode_hdr_maxsz + \ | 307 | #define NFS4_enc_remove_sz (compound_encode_hdr_maxsz + \ |
308 | encode_putfh_maxsz + \ | 308 | encode_putfh_maxsz + \ |
309 | encode_remove_maxsz) | 309 | encode_remove_maxsz + \ |
310 | encode_getattr_maxsz) | ||
310 | #define NFS4_dec_remove_sz (compound_decode_hdr_maxsz + \ | 311 | #define NFS4_dec_remove_sz (compound_decode_hdr_maxsz + \ |
311 | decode_putfh_maxsz + \ | 312 | decode_putfh_maxsz + \ |
312 | op_decode_hdr_maxsz + 5) | 313 | op_decode_hdr_maxsz + 5 + \ |
314 | decode_getattr_maxsz) | ||
313 | #define NFS4_enc_rename_sz (compound_encode_hdr_maxsz + \ | 315 | #define NFS4_enc_rename_sz (compound_encode_hdr_maxsz + \ |
314 | encode_putfh_maxsz + \ | 316 | encode_putfh_maxsz + \ |
315 | encode_savefh_maxsz + \ | 317 | encode_savefh_maxsz + \ |
@@ -1327,14 +1329,18 @@ static int nfs4_xdr_enc_remove(struct rpc_rqst *req, uint32_t *p, const struct n | |||
1327 | { | 1329 | { |
1328 | struct xdr_stream xdr; | 1330 | struct xdr_stream xdr; |
1329 | struct compound_hdr hdr = { | 1331 | struct compound_hdr hdr = { |
1330 | .nops = 2, | 1332 | .nops = 3, |
1331 | }; | 1333 | }; |
1332 | int status; | 1334 | int status; |
1333 | 1335 | ||
1334 | xdr_init_encode(&xdr, &req->rq_snd_buf, p); | 1336 | xdr_init_encode(&xdr, &req->rq_snd_buf, p); |
1335 | encode_compound_hdr(&xdr, &hdr); | 1337 | encode_compound_hdr(&xdr, &hdr); |
1336 | if ((status = encode_putfh(&xdr, args->fh)) == 0) | 1338 | if ((status = encode_putfh(&xdr, args->fh)) != 0) |
1337 | status = encode_remove(&xdr, args->name); | 1339 | goto out; |
1340 | if ((status = encode_remove(&xdr, args->name)) != 0) | ||
1341 | goto out; | ||
1342 | status = encode_getfattr(&xdr, args->bitmask); | ||
1343 | out: | ||
1338 | return status; | 1344 | return status; |
1339 | } | 1345 | } |
1340 | 1346 | ||
@@ -3512,7 +3518,7 @@ out: | |||
3512 | /* | 3518 | /* |
3513 | * Decode REMOVE response | 3519 | * Decode REMOVE response |
3514 | */ | 3520 | */ |
3515 | static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, uint32_t *p, struct nfs4_change_info *cinfo) | 3521 | static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, uint32_t *p, struct nfs4_remove_res *res) |
3516 | { | 3522 | { |
3517 | struct xdr_stream xdr; | 3523 | struct xdr_stream xdr; |
3518 | struct compound_hdr hdr; | 3524 | struct compound_hdr hdr; |
@@ -3521,8 +3527,11 @@ static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, uint32_t *p, struct nfs4_ | |||
3521 | xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); | 3527 | xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p); |
3522 | if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) | 3528 | if ((status = decode_compound_hdr(&xdr, &hdr)) != 0) |
3523 | goto out; | 3529 | goto out; |
3524 | if ((status = decode_putfh(&xdr)) == 0) | 3530 | if ((status = decode_putfh(&xdr)) != 0) |
3525 | status = decode_remove(&xdr, cinfo); | 3531 | goto out; |
3532 | if ((status = decode_remove(&xdr, &res->cinfo)) != 0) | ||
3533 | goto out; | ||
3534 | decode_getfattr(&xdr, res->dir_attr, res->server); | ||
3526 | out: | 3535 | out: |
3527 | return status; | 3536 | return status; |
3528 | } | 3537 | } |