summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-05-29 17:46:52 +0000
committeriedowse <iedowse@FreeBSD.org>2001-05-29 17:46:52 +0000
commitfdb42dd4bf429f38a9ffc635d5c04d380f354ee6 (patch)
treedbc9f4175b63c19230cbb7323800b5d9bd931cb3 /sys/kern/vfs_export.c
parentbd38254e2edd7d3cf7daf140496f3e44ff42a3e7 (diff)
downloadFreeBSD-src-fdb42dd4bf429f38a9ffc635d5c04d380f354ee6.zip
FreeBSD-src-fdb42dd4bf429f38a9ffc635d5c04d380f354ee6.tar.gz
Since the netexport struct was centralised to 'struct mount',
attempting to remove nonexistant exports with MNT_DELEXPORT returns an error; before this change it always succeeded. This caused mountd(8) to log "can't delete exports for /whatever" warnings. Change the error code from EINVAL to a more specific ENOENT, and make mountd ignore this error when deleting the export list. I could have just restored the previous behaviour of returning success, but I think an error return is a useful diagnostic. Reviewed by: phk
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r--sys/kern/vfs_export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 64677cb..53e67fa 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -207,7 +207,7 @@ vfs_export(mp, argp)
nep = mp->mnt_export;
if (argp->ex_flags & MNT_DELEXPORT) {
if (nep == NULL)
- return (EINVAL);
+ return (ENOENT);
if (mp->mnt_flag & MNT_EXPUBLIC) {
vfs_setpublicfs(NULL, NULL, NULL);
mp->mnt_flag &= ~MNT_EXPUBLIC;
OpenPOWER on IntegriCloud