|
|
f3080c |
autofs-5.1.8 - remove nonstrict parameter from tree_mapent_umount_offsets()
|
|
|
f3080c |
|
|
|
f3080c |
From: Ian Kent <raven@themaw.net>
|
|
|
f3080c |
|
|
|
f3080c |
The nonstrict parameter of tree_mapent_umount_offsets() ins't useful
|
|
|
f3080c |
because if a real mount at the base of a sub-tree fails to umount all
|
|
|
f3080c |
we can do is re-instate the offset mounts under it which must succeed
|
|
|
f3080c |
for the mount tree to remain useful.
|
|
|
f3080c |
|
|
|
f3080c |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
f3080c |
---
|
|
|
f3080c |
CHANGELOG | 1 +
|
|
|
f3080c |
daemon/automount.c | 2 +-
|
|
|
f3080c |
include/mounts.h | 2 +-
|
|
|
f3080c |
lib/mounts.c | 6 +++---
|
|
|
f3080c |
4 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
f3080c |
|
|
|
f3080c |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
f3080c |
+++ autofs-5.1.4/CHANGELOG
|
|
|
f3080c |
@@ -92,6 +92,7 @@
|
|
|
f3080c |
- fix memory leak in xdr_exports().
|
|
|
f3080c |
- avoid calling pthread_getspecific() with NULL key_thread_attempt_id.
|
|
|
f3080c |
- fix sysconf(3) return handling.
|
|
|
f3080c |
+- remove nonstrict parameter from tree_mapent_umount_offsets().
|
|
|
f3080c |
|
|
|
f3080c |
xx/xx/2018 autofs-5.1.5
|
|
|
f3080c |
- fix flag file permission.
|
|
|
f3080c |
--- autofs-5.1.4.orig/daemon/automount.c
|
|
|
f3080c |
+++ autofs-5.1.4/daemon/automount.c
|
|
|
f3080c |
@@ -555,7 +555,7 @@ static int umount_subtree_mounts(struct
|
|
|
f3080c |
struct mapent *tmp;
|
|
|
f3080c |
int ret;
|
|
|
f3080c |
|
|
|
f3080c |
- ret = tree_mapent_umount_offsets(me, 1);
|
|
|
f3080c |
+ ret = tree_mapent_umount_offsets(me);
|
|
|
f3080c |
if (!ret) {
|
|
|
f3080c |
warn(ap->logopt,
|
|
|
f3080c |
"some offset mounts still present under %s", path);
|
|
|
f3080c |
--- autofs-5.1.4.orig/include/mounts.h
|
|
|
f3080c |
+++ autofs-5.1.4/include/mounts.h
|
|
|
f3080c |
@@ -182,7 +182,7 @@ int tree_mapent_add_node(struct mapent_c
|
|
|
f3080c |
int tree_mapent_delete_offsets(struct mapent_cache *mc, const char *key);
|
|
|
f3080c |
void tree_mapent_cleanup_offsets(struct mapent *oe);
|
|
|
f3080c |
int tree_mapent_mount_offsets(struct mapent *oe, int nonstrict);
|
|
|
f3080c |
-int tree_mapent_umount_offsets(struct mapent *oe, int nonstrict);
|
|
|
f3080c |
+int tree_mapent_umount_offsets(struct mapent *oe);
|
|
|
f3080c |
int unlink_mount_tree(struct autofs_point *ap, const char *mp);
|
|
|
f3080c |
void free_mnt_list(struct mnt_list *list);
|
|
|
f3080c |
int is_mounted(const char *mp, unsigned int type);
|
|
|
f3080c |
--- autofs-5.1.4.orig/lib/mounts.c
|
|
|
f3080c |
+++ autofs-5.1.4/lib/mounts.c
|
|
|
f3080c |
@@ -1843,7 +1843,7 @@ static int tree_mapent_umount_offset(str
|
|
|
f3080c |
* Check for and umount subtree offsets resulting from
|
|
|
f3080c |
* nonstrict mount fail.
|
|
|
f3080c |
*/
|
|
|
f3080c |
- ret = tree_mapent_umount_offsets(oe, ctxt->strict);
|
|
|
f3080c |
+ ret = tree_mapent_umount_offsets(oe);
|
|
|
f3080c |
if (!ret)
|
|
|
f3080c |
return 0;
|
|
|
f3080c |
|
|
|
f3080c |
@@ -1975,14 +1975,14 @@ static int tree_mapent_umount_offsets_wo
|
|
|
f3080c |
return tree_mapent_umount_offset(oe, ptr);
|
|
|
f3080c |
}
|
|
|
f3080c |
|
|
|
f3080c |
-int tree_mapent_umount_offsets(struct mapent *oe, int nonstrict)
|
|
|
f3080c |
+int tree_mapent_umount_offsets(struct mapent *oe)
|
|
|
f3080c |
{
|
|
|
f3080c |
struct tree_node *base = MAPENT_NODE(oe);
|
|
|
f3080c |
struct autofs_point *ap = oe->mc->ap;
|
|
|
f3080c |
struct traverse_subtree_context ctxt = {
|
|
|
f3080c |
.ap = ap,
|
|
|
f3080c |
.base = base,
|
|
|
f3080c |
- .strict = !nonstrict,
|
|
|
f3080c |
+ .strict = 1,
|
|
|
f3080c |
};
|
|
|
f3080c |
int ret;
|
|
|
f3080c |
|