]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] kNFSd: NFSv4: wipe out all evidence in fh_put()
authorKendrick M. Smith <kmsmith@umich.edu>
Fri, 23 Aug 2002 04:37:27 +0000 (21:37 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 23 Aug 2002 04:37:27 +0000 (21:37 -0700)
When a filehandle is cleared with fh_put(), wipe out all traces by
clearing ->fh_pre_saved and ->fh_post_saved.  This prevents
fill_post_wcc() from complaining if the filehandle is later reused.
(This could happen in NFSv4 to CURRENT_FH if, for example, LOOKUP LOOKUP
occurs in a COMPOUND.)

fs/nfsd/nfsfh.c

index 38ff0dc0f9fdcd05b4a01a118141adec3f0abcd9..0764adfa5292c9511ab7a5c3fcc504d7238d88cb 100644 (file)
@@ -438,6 +438,10 @@ fh_put(struct svc_fh *fhp)
                fh_unlock(fhp);
                fhp->fh_dentry = NULL;
                dput(dentry);
+#ifdef CONFIG_NFSD_V3
+               fhp->fh_pre_saved = 0;
+               fhp->fh_post_saved = 0;
+#endif
                nfsd_nr_put++;
        }
        return;