]> err.no Git - linux-2.6/commitdiff
[PATCH] nfsd: fix spurious error return from nfsd_create in async case
authorJ. Bruce Fields <bfields@fieldses.org>
Thu, 9 Nov 2006 01:44:59 +0000 (17:44 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 9 Nov 2006 02:29:25 +0000 (18:29 -0800)
Commit 6264d69d7df654ca64f625e9409189a0e50734e9 modified the nfsd_create()
error handling in such a way that nfsd_create will usually return
nfserr_perm even when succesful, if the export has the async export option.

This introduced a regression that could cause mkdir() to always return a
permissions error, even though the directory in question was actually
succesfully created.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/vfs.c

index 1a7ad8c983d17e3aeb5952811b7b1ade9aef5e39..bb4d926e4487dd60f1f9a72b3b06c9bb2d496848 100644 (file)
@@ -1177,7 +1177,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
        /*
         * Get the dir op function pointer.
         */
-       err = nfserr_perm;
+       err = 0;
        switch (type) {
        case S_IFREG:
                host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL);