aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-08-30 22:15:47 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-09-01 11:12:47 -0400
commit7c13f344cf8bec22301c5ed7ef1d90eecb57ba43 (patch)
tree41ed822e8992c9cc37775902349779f4d5273568 /fs/nfsd/nfs4xdr.c
parentfff6ca9cc46857e5814cf687e5fb1b8a876766a4 (diff)
nfsd4: drop most stateowner refcounting
Maybe we'll bring it back some day, but we don't have much real use for it now. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 462c6eff8471..c4dcba3aac1f 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2570,17 +2570,18 @@ nfsd4_encode_getfh(struct nfsd4_compoundres *resp, __be32 nfserr, struct svc_fh
2570static void 2570static void
2571nfsd4_encode_lock_denied(struct nfsd4_compoundres *resp, struct nfsd4_lock_denied *ld) 2571nfsd4_encode_lock_denied(struct nfsd4_compoundres *resp, struct nfsd4_lock_denied *ld)
2572{ 2572{
2573 struct xdr_netobj *conf = &ld->ld_owner;
2573 __be32 *p; 2574 __be32 *p;
2574 2575
2575 RESERVE_SPACE(32 + XDR_LEN(ld->ld_sop ? ld->ld_sop->so_owner.len : 0)); 2576 RESERVE_SPACE(32 + XDR_LEN(conf->len));
2576 WRITE64(ld->ld_start); 2577 WRITE64(ld->ld_start);
2577 WRITE64(ld->ld_length); 2578 WRITE64(ld->ld_length);
2578 WRITE32(ld->ld_type); 2579 WRITE32(ld->ld_type);
2579 if (ld->ld_sop) { 2580 if (conf->len) {
2580 WRITEMEM(&ld->ld_clientid, 8); 2581 WRITEMEM(&ld->ld_clientid, 8);
2581 WRITE32(ld->ld_sop->so_owner.len); 2582 WRITE32(conf->len);
2582 WRITEMEM(ld->ld_sop->so_owner.data, ld->ld_sop->so_owner.len); 2583 WRITEMEM(conf->data, conf->len);
2583 kref_put(&ld->ld_sop->so_ref, nfs4_free_stateowner); 2584 kfree(conf->data);
2584 } else { /* non - nfsv4 lock in conflict, no clientid nor owner */ 2585 } else { /* non - nfsv4 lock in conflict, no clientid nor owner */
2585 WRITE64((u64)0); /* clientid */ 2586 WRITE64((u64)0); /* clientid */
2586 WRITE32(0); /* length of owner name */ 2587 WRITE32(0); /* length of owner name */