]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (mount) fix recursion
authorKarel Zak <kzak@redhat.com>
Wed, 21 Sep 2022 16:01:05 +0000 (18:01 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_mount.c

index 50c9ae5a5730845e0541e0e6be32627ef7f6fe75..d4be4d73704108518f8525a59a3280e0c4c59c3a 100644 (file)
@@ -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;