X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=85e89753c760b81044a2b5b9d535ba3c7d467d6c;hp=e8d72fa0beb1bd366ad213e07e17128ec8c401e9;hb=849cdc25d0060621662b7b311e02bcabc92fb4d7;hpb=4d53ca0ba7a855df0dea0808d395ee74c482dfb1 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); }