From 11e396a01fd68d7e2774ec03be89b9626f363d8d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 21 Sep 2022 18:01:05 +0200 Subject: [PATCH] libmount: (mount) fix recursion Signed-off-by: Karel Zak --- libmount/src/hook_mount.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c index 50c9ae5a57..d4be4d7370 100644 --- a/libmount/src/hook_mount.c +++ b/libmount/src/hook_mount.c @@ -152,7 +152,7 @@ static int hook_set_vfsflags(struct libmnt_context *cxt, if (rc) return rc; - if (mnt_optlist_is_rbind(ol)) + if (mnt_optlist_is_recursive(ol)) callflags |= AT_RECURSIVE; DBG(HOOK, ul_debugobj(hs, "mount_setattr(set=0x%" PRIx64")", mask)); @@ -230,10 +230,9 @@ static int init_sysapi(struct libmnt_context *cxt, if (path) { unsigned long oflg = OPEN_TREE_CLOEXEC; - /* TODO - if (mnt_context_is_recursive(cxt)) + if (mnt_optlist_is_recursive(cxt->optlist)) oflg |= AT_RECURSIVE; - */ + if (flags & MS_BIND) oflg |= OPEN_TREE_CLONE; -- 2.47.3