From 376f11934f7dfa906eb8304ee48982d68ef64fd0 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Fri, 4 Sep 2009 14:40:36 -0400 Subject: [PATCH] --- yaml --- r: 164631 b: refs/heads/master c: aed100fafb90aaabe8fb31e58af9dc7e68696507 h: refs/heads/master i: 164629: 147d1ef2ab955483fc2230d10676056cd0634485 164627: 588efdf8501a3b8abba7fc6d2bf0540f06546c20 164623: 54e46be83cd905dcc50342535932f1b85072a521 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs3xdr.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index de0c6f2d4b1c..b8cfbfce80c5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8177e6d6dfb9cd03d9bdeb647c32161f8f58f686 +refs/heads/master: aed100fafb90aaabe8fb31e58af9dc7e68696507 diff --git a/trunk/fs/nfsd/nfs3xdr.c b/trunk/fs/nfsd/nfs3xdr.c index f16184a39941..edf926e1062f 100644 --- a/trunk/fs/nfsd/nfs3xdr.c +++ b/trunk/fs/nfsd/nfs3xdr.c @@ -825,7 +825,6 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp, dparent = cd->fh.fh_dentry; exp = cd->fh.fh_export; - fh_init(fhp, NFS3_FHSIZE); if (isdotent(name, namlen)) { if (namlen == 2) { dchild = dget_parent(dparent); @@ -859,15 +858,17 @@ __be32 *encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p, const c struct svc_fh fh; int err; + fh_init(&fh, NFS3_FHSIZE); err = compose_entry_fh(cd, &fh, name, namlen); if (err) { *p++ = 0; *p++ = 0; - return p; + goto out; } p = encode_post_op_attr(cd->rqstp, p, &fh); *p++ = xdr_one; /* yes, a file handle follows */ p = encode_fh(p, &fh); +out: fh_put(&fh); return p; }