aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-07-31 03:37:53 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:38 -0400
commit4a4b88317aa02c82e66e37debb764d4ff3eedd70 (patch)
tree4a4a2157f5b4117d28c38cb290dd1c804246ffb1 /fs/nfsd
parent0a725fc4d3bfc4734164863d6c50208b109ca5c7 (diff)
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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/export.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 2d295dda4c1d..cba899a3494e 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -564,9 +564,10 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
564 564
565 /* flags */ 565 /* flags */
566 err = get_int(&mesg, &an_int); 566 err = get_int(&mesg, &an_int);
567 if (err == -ENOENT) 567 if (err == -ENOENT) {
568 err = 0;
568 set_bit(CACHE_NEGATIVE, &exp.h.flags); 569 set_bit(CACHE_NEGATIVE, &exp.h.flags);
569 else { 570 } else {
570 if (err || an_int < 0) goto out; 571 if (err || an_int < 0) goto out;
571 exp.ex_flags= an_int; 572 exp.ex_flags= an_int;
572 573