aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-03 03:55:15 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-06 14:58:43 -0500
commit864472e9b8fa76ffaad17dfcb84d79e16df6828c (patch)
tree1cc5c4624c36be0b9aebdabae30d1a5385e04dee /fs/nfs/nfs4xdr.c
parente761692381f294ea079d2e869fcd7c0afc79e394 (diff)
NFSv4: Make open recovery track O_RDWR, O_RDONLY and O_WRONLY correctly
When recovering from a delegation recall or a network partition, we need to replay open(O_RDWR), open(O_RDONLY) and open(O_WRONLY) separately. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 2ba9906f2a51..3100172822c9 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1552,19 +1552,19 @@ static int nfs4_xdr_enc_open_noattr(struct rpc_rqst *req, uint32_t *p, struct nf
1552{ 1552{
1553 struct xdr_stream xdr; 1553 struct xdr_stream xdr;
1554 struct compound_hdr hdr = { 1554 struct compound_hdr hdr = {
1555 .nops = 2, 1555 .nops = 3,
1556 }; 1556 };
1557 int status; 1557 int status;
1558 1558
1559 status = nfs_wait_on_sequence(args->seqid, req->rq_task);
1560 if (status != 0)
1561 goto out;
1562 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 1559 xdr_init_encode(&xdr, &req->rq_snd_buf, p);
1563 encode_compound_hdr(&xdr, &hdr); 1560 encode_compound_hdr(&xdr, &hdr);
1564 status = encode_putfh(&xdr, args->fh); 1561 status = encode_putfh(&xdr, args->fh);
1565 if (status) 1562 if (status)
1566 goto out; 1563 goto out;
1567 status = encode_open(&xdr, args); 1564 status = encode_open(&xdr, args);
1565 if (status)
1566 goto out;
1567 status = encode_getfattr(&xdr, args->bitmask);
1568out: 1568out:
1569 return status; 1569 return status;
1570} 1570}
@@ -3825,6 +3825,9 @@ static int nfs4_xdr_dec_open_noattr(struct rpc_rqst *rqstp, uint32_t *p, struct
3825 if (status) 3825 if (status)
3826 goto out; 3826 goto out;
3827 status = decode_open(&xdr, res); 3827 status = decode_open(&xdr, res);
3828 if (status)
3829 goto out;
3830 decode_getfattr(&xdr, res->f_attr, res->server);
3828out: 3831out:
3829 return status; 3832 return status;
3830} 3833}