]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: use optlist to get infor about MS_REC
authorKarel Zak <kzak@redhat.com>
Fri, 26 Aug 2022 08:18:14 +0000 (10:18 +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_idmap.c

index 254fd13c0165d05fb9030c1f9c34cfc15394f3da..29f34700ccb057e4c3f1ac3c80257744e5dd8772 100644 (file)
@@ -284,12 +284,11 @@ static int hook_mount_post(
                .attr_set       = MOUNT_ATTR_IDMAP,
                .userns_fd      = hd->userns_fd
        };
-       const int recursive = cxt->mountflags & MS_REC;
+       const int recursive = mnt_optlist_is_recursive(cxt->optlist);
        const char *target = mnt_fs_get_target(cxt->fs);
        int fd_tree = -1;
        int rc;
 
-       assert(cxt);
        assert(hd);
        assert(target);
        assert(hd->userns_fd >= 0);