[PATCH] nfsd: fix spurious error return from nfsd_create in async case

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>

authored by J. Bruce Fields and committed by Linus Torvalds 088406bc 51f65ebc

+1 -1
+1 -1
fs/nfsd/vfs.c
··· 1177 1177 /* 1178 1178 * Get the dir op function pointer. 1179 1179 */ 1180 - err = nfserr_perm; 1180 + err = 0; 1181 1181 switch (type) { 1182 1182 case S_IFREG: 1183 1183 host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL);