aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/autofs/autounmountd.c
diff options
context:
space:
mode:
authorRobert Wing <rew@FreeBSD.org>2021-02-17 07:51:38 +0000
committerRobert Wing <rew@FreeBSD.org>2021-03-12 15:41:55 +0000
commit88e531f38c2412bf030f4e8dd563efc45b70797e (patch)
tree4ea040779339a87a218be89d1e3a5fa3b44c41e3 /usr.sbin/autofs/autounmountd.c
parent0dfbdd9fc269f0438ffcc31632d35234a90584ad (diff)
downloadsrc-88e531f38c2412bf030f4e8dd563efc45b70797e.tar.gz
src-88e531f38c2412bf030f4e8dd563efc45b70797e.zip
autofs: best effort to maintain mounttab and mountdtab
When an automounted filesystem is successfully unmounted, call rpc.umntall(8) with the -k flag. rpc.umntall(8) is used to clean up /var/db/mounttab on the client and /var/db/mountdtab on the server. This is only useful for NFSv3. PR: 251906 Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D27801
Diffstat (limited to 'usr.sbin/autofs/autounmountd.c')
-rw-r--r--usr.sbin/autofs/autounmountd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/autofs/autounmountd.c b/usr.sbin/autofs/autounmountd.c
index 7a4f04c0b848..57375f04d743 100644
--- a/usr.sbin/autofs/autounmountd.c
+++ b/usr.sbin/autofs/autounmountd.c
@@ -170,7 +170,8 @@ unmount_by_fsid(const fsid_t fsid, const char *mountpoint)
log_warn("cannot unmount %s (%s)",
mountpoint, fsid_str);
}
- }
+ } else
+ rpc_umntall();
free(fsid_str);