Skip to content

Commit

Permalink
knfsd: eliminate unnecessary -ENOENT returns on export downcalls
Browse files Browse the repository at this point in the history
A succesful downcall with a negative result (which indicates that the given
filesystem is not exported to the given user) should not return an error.

Currently mountd is depending on stdio to write these downcalls.  With some
versions of libc this appears to cause subsequent writes to attempt to write
all accumulated data (for which writes previously failed) along with any new
data.  This can prevent the kernel from seeing responses to later downcalls.
Symptoms will be that nfsd fails to respond to certain requests.

Signed-off-by: "J. Bruce Fields" <[email protected]>
Cc: Neil Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jul 31, 2007
1 parent 0a725fc commit 4a4b883
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,10 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)

/* flags */
err = get_int(&mesg, &an_int);
if (err == -ENOENT)
if (err == -ENOENT) {
err = 0;
set_bit(CACHE_NEGATIVE, &exp.h.flags);
else {
} else {
if (err || an_int < 0) goto out;
exp.ex_flags= an_int;

Expand Down

0 comments on commit 4a4b883

Please sign in to comment.