]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (mkdir) simplify X-mount.mkdir check
authorKarel Zak <kzak@redhat.com>
Fri, 19 Aug 2022 16:44:00 +0000 (18:44 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
It's enough to check for the option, it's unnecessary to check also flags.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_mkdir.c

index b83907f42b7b36df9e9c73f0fd966f67656029fd..bd8a083030fffd39267963c10a797004f4e97ee5 100644 (file)
@@ -94,7 +94,6 @@ static int hook_prepare_target(
        int rc = 0;
        mode_t mode = 0;
        const char *tgt;
-       unsigned long flags = 0;
 
        assert(cxt);
 
@@ -102,12 +101,7 @@ static int hook_prepare_target(
        if (!tgt)
                return 0;
 
-       rc = mnt_context_get_user_mflags(cxt, &flags);
-       if (rc)
-               return rc;
-
        if (cxt->action == MNT_ACT_MOUNT
-           && (flags & MNT_MS_XCOMMENT || flags & MNT_MS_XFSTABCOMM)
            && is_mkdir_required(cxt, tgt, &mode, &rc)) {
 
                struct libmnt_cache *cache;