diff options
author | Ian Kent <raven@themaw.net> | 2017-10-22 17:00:52 +0800 |
---|---|---|
committer | Ian Kent <raven@themaw.net> | 2017-12-18 08:47:07 +0800 |
commit | eb5809d1d14058d290fe3f66ac59d5461327b211 (patch) | |
tree | 24ee6ab659f5f2ac3d10464be0b77865c31839a2 /daemon | |
parent | b583547c98d8ae7773e83569d6c819f044699bfd (diff) | |
download | autofs-eb5809d1d14058d290fe3f66ac59d5461327b211.tar.gz |
autofs-5.1.3 - add function umount_amd_ext_mount()
Refactor amd external umount code, move the code into its own
function.
Later amd umounting of program mounts with a custom command will
be added.
Signed-off-by: Ian Kent <raven@themaw.net>
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/automount.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/daemon/automount.c b/daemon/automount.c index 3ff4f778..5c739617 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -607,16 +607,7 @@ static int umount_subtree_mounts(struct autofs_point *ap, const char *path, unsi } list_del(&entry->entries); mounts_mutex_unlock(ap); - if (ext_mount_remove(&entry->ext_mount, entry->fs)) { - if (umount_ent(ap, entry->fs)) - debug(ap->logopt, - "failed to umount external mount %s", - entry->fs); - else - debug(ap->logopt, - "umounted external mount %s", - entry->fs); - } + umount_amd_ext_mount(ap, entry); free_amd_entry(entry); } done: @@ -663,16 +654,7 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl) } list_del(&entry->entries); mounts_mutex_unlock(ap); - if (ext_mount_remove(&entry->ext_mount, entry->fs)) { - if (umount_ent(ap, entry->fs)) - debug(ap->logopt, - "failed to umount external mount %s", - entry->fs); - else - debug(ap->logopt, - "umounted external mount %s", - entry->fs); - } + umount_amd_ext_mount(ap, entry); free_amd_entry(entry); return 0; } |