From: Karel Zak Date: Wed, 21 Sep 2022 16:01:05 +0000 (+0200) Subject: libmount: (mount) fix recursion X-Git-Tag: v2.39-rc1~254 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11e396a01fd68d7e2774ec03be89b9626f363d8d;p=thirdparty%2Futil-linux.git libmount: (mount) fix recursion Signed-off-by: Karel Zak --- 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;