You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.9 KiB
86 lines
2.9 KiB
3 years ago
|
autofs-5.1.8 - remove nonstrict parameter from tree_mapent_umount_offsets()
|
||
|
|
||
|
From: Ian Kent <raven@themaw.net>
|
||
|
|
||
|
The nonstrict parameter of tree_mapent_umount_offsets() ins't useful
|
||
|
because if a real mount at the base of a sub-tree fails to umount all
|
||
|
we can do is re-instate the offset mounts under it which must succeed
|
||
|
for the mount tree to remain useful.
|
||
|
|
||
|
Signed-off-by: Ian Kent <raven@themaw.net>
|
||
|
---
|
||
|
CHANGELOG | 1 +
|
||
|
daemon/automount.c | 2 +-
|
||
|
include/mounts.h | 2 +-
|
||
|
lib/mounts.c | 6 +++---
|
||
|
4 files changed, 6 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/CHANGELOG b/CHANGELOG
|
||
|
index a063a126..5402b88d 100644
|
||
|
--- a/CHANGELOG
|
||
|
+++ b/CHANGELOG
|
||
|
@@ -14,6 +14,7 @@
|
||
|
- fix memory leak in xdr_exports().
|
||
|
- avoid calling pthread_getspecific() with NULL key_thread_attempt_id.
|
||
|
- fix sysconf(3) return handling.
|
||
|
+- remove nonstrict parameter from tree_mapent_umount_offsets().
|
||
|
|
||
|
19/10/2021 autofs-5.1.8
|
||
|
- add xdr_exports().
|
||
|
diff --git a/daemon/automount.c b/daemon/automount.c
|
||
|
index b47c485b..353e4f54 100644
|
||
|
--- a/daemon/automount.c
|
||
|
+++ b/daemon/automount.c
|
||
|
@@ -558,7 +558,7 @@ static int umount_subtree_mounts(struct autofs_point *ap, const char *path, unsi
|
||
|
struct mapent *tmp;
|
||
|
int ret;
|
||
|
|
||
|
- ret = tree_mapent_umount_offsets(me, 1);
|
||
|
+ ret = tree_mapent_umount_offsets(me);
|
||
|
if (!ret) {
|
||
|
warn(ap->logopt,
|
||
|
"some offset mounts still present under %s", path);
|
||
|
diff --git a/include/mounts.h b/include/mounts.h
|
||
|
index ddb7e4c5..23c7ba1c 100644
|
||
|
--- a/include/mounts.h
|
||
|
+++ b/include/mounts.h
|
||
|
@@ -182,7 +182,7 @@ int tree_mapent_add_node(struct mapent_cache *mc, struct tree_node *root, struct
|
||
|
int tree_mapent_delete_offsets(struct mapent_cache *mc, const char *key);
|
||
|
void tree_mapent_cleanup_offsets(struct mapent *oe);
|
||
|
int tree_mapent_mount_offsets(struct mapent *oe, int nonstrict);
|
||
|
-int tree_mapent_umount_offsets(struct mapent *oe, int nonstrict);
|
||
|
+int tree_mapent_umount_offsets(struct mapent *oe);
|
||
|
int unlink_mount_tree(struct autofs_point *ap, const char *mp);
|
||
|
void free_mnt_list(struct mnt_list *list);
|
||
|
int is_mounted(const char *mp, unsigned int type);
|
||
|
diff --git a/lib/mounts.c b/lib/mounts.c
|
||
|
index ad8f3de4..617c1d54 100644
|
||
|
--- a/lib/mounts.c
|
||
|
+++ b/lib/mounts.c
|
||
|
@@ -1843,7 +1843,7 @@ static int tree_mapent_umount_offset(struct mapent *oe, void *ptr)
|
||
|
* Check for and umount subtree offsets resulting from
|
||
|
* nonstrict mount fail.
|
||
|
*/
|
||
|
- ret = tree_mapent_umount_offsets(oe, ctxt->strict);
|
||
|
+ ret = tree_mapent_umount_offsets(oe);
|
||
|
if (!ret)
|
||
|
return 0;
|
||
|
|
||
|
@@ -1975,14 +1975,14 @@ static int tree_mapent_umount_offsets_work(struct tree_node *n, void *ptr)
|
||
|
return tree_mapent_umount_offset(oe, ptr);
|
||
|
}
|
||
|
|
||
|
-int tree_mapent_umount_offsets(struct mapent *oe, int nonstrict)
|
||
|
+int tree_mapent_umount_offsets(struct mapent *oe)
|
||
|
{
|
||
|
struct tree_node *base = MAPENT_NODE(oe);
|
||
|
struct autofs_point *ap = oe->mc->ap;
|
||
|
struct traverse_subtree_context ctxt = {
|
||
|
.ap = ap,
|
||
|
.base = base,
|
||
|
- .strict = !nonstrict,
|
||
|
+ .strict = 1,
|
||
|
};
|
||
|
int ret;
|
||
|
|