summaryrefslogtreecommitdiffstats
path: root/utils/exportfs/exportfs.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2016-11-15 12:03:24 -0500
committerSteve Dickson <steved@redhat.com>2016-11-15 16:47:03 -0500
commit394e388e1e62d88f2771a3a65ed34c63c1e481bf (patch)
tree5852c9431b8934d1966cdb44e8468fac3cf5e49c /utils/exportfs/exportfs.c
parent8f3d12ce1d156b8809dc936d9e452e14e2788b3e (diff)
downloadnfs-utils-394e388e1e62d88f2771a3a65ed34c63c1e481bf.tar.gz
nfs-utils-394e388e1e62d88f2771a3a65ed34c63c1e481bf.tar.xz
nfs-utils-394e388e1e62d88f2771a3a65ed34c63c1e481bf.zip
Remove all use of /var/lib/nfs/xtab
/var/lib/nfs/xtab is only used to find out what has been exported to the kernel. This is more reliably done by reading /proc/fs/nfs{,d}/export and nfs-utils uses that file if is available. So xtab is only need if you have an incredibly ancient kernel which doesn't have /proc/fs/nfs/export (and so which only supports NFSv2) or if /proc is not mounted. Neither of these are credible contexts to run a modern nfs-utils, so stop creating or reading the xtab file. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/exportfs/exportfs.c')
-rw-r--r--utils/exportfs/exportfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index 5136810..98368a5 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -219,8 +219,6 @@ main(int argc, char **argv)
xtab_export_write();
if (new_cache)
cache_flush(force_flush);
- if (!new_cache)
- xtab_mount_write();
return export_errno;
}
@@ -238,7 +236,7 @@ exports_update_one(nfs_export *exp, int verbose)
exp->m_export.e_path, exp->m_export.e_mountpoint);
exp->m_mayexport = 0;
}
- if (exp->m_mayexport && ((exp->m_exported<1) || exp->m_changed)) {
+ if (exp->m_mayexport && exp->m_changed) {
if (verbose)
printf("%sexporting %s:%s to kernel\n",
exp->m_exported ?"re":"",