Revert "SELinux: do not handle seclabel as a special flag"
[kernel/kernel-generic.git] / security / selinux / hooks.c
index 0d4408d..c156f5e 100644 (file)
@@ -504,6 +504,9 @@ static int selinux_get_mnt_opts(const struct super_block *sb,
                        opts->num_mnt_opts++;
                tmp >>= 1;
        }
+       /* Check if the Label support flag is set */
+       if (sbsec->flags & SBLABEL_MNT)
+               opts->num_mnt_opts++;
 
        opts->mnt_opts = kcalloc(opts->num_mnt_opts, sizeof(char *), GFP_ATOMIC);
        if (!opts->mnt_opts) {