Skip to content

Commit 4a4b883

Browse files
J. Bruce FieldsLinus Torvalds
authored andcommitted
knfsd: eliminate unnecessary -ENOENT returns on export downcalls
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" <bfields@citi.umich.edu> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0a725fc commit 4a4b883

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎fs/nfsd/export.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,10 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
564564

565565
/* flags */
566566
err = get_int(&mesg, &an_int);
567-
if (err == -ENOENT)
567+
if (err == -ENOENT) {
568+
err = 0;
568569
set_bit(CACHE_NEGATIVE, &exp.h.flags);
569-
else {
570+
} else {
570571
if (err || an_int < 0) goto out;
571572
exp.ex_flags= an_int;
572573

0 commit comments

Comments
 (0)