diff options
author | Neil Brown <neilb@suse.de> | 2007-03-29 13:08:01 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-03-29 13:08:01 +1000 |
commit | 849cdc25d0060621662b7b311e02bcabc92fb4d7 (patch) | |
tree | f304ea774d57814d467fe2991bdff3de300eca3e | |
parent | 4d53ca0ba7a855df0dea0808d395ee74c482dfb1 (diff) | |
download | nfs-utils-849cdc25d0060621662b7b311e02bcabc92fb4d7.tar.gz nfs-utils-849cdc25d0060621662b7b311e02bcabc92fb4d7.tar.xz nfs-utils-849cdc25d0060621662b7b311e02bcabc92fb4d7.zip |
mountd - better response to failed attempts to export filesystems
If the kernel rejects an attempt to export a filesystem - e.g. because
it is not exportable, we shouldn't just ignore the error, but rather
should tell the kernel that the relevant filehandle or path cannot be supported.
We should really print out some error messages too.
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r-- | utils/mountd/cache.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index e8d72fa..85e8975 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -469,7 +469,8 @@ void nfsd_fh(FILE *f) } if (found) - cache_export_ent(dom, found, found_path); + if (cache_export_ent(dom, found, found_path) < 0) + found = 0; qword_print(f, dom); qword_printint(f, fsidtype); @@ -619,8 +620,10 @@ void nfsd_export(FILE *f) } if (found) { - dump_to_cache(f, dom, path, &found->m_export); - mountlist_add(dom, path); + if (dump_to_cache(f, dom, path, &found->m_export) < 0) + dump_to_cache(f, dom, path, NULL); + else + mountlist_add(dom, path); } else { dump_to_cache(f, dom, path, NULL); } |