From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:44266 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeLACT7 (ORCPT ); Fri, 30 Nov 2018 21:19:59 -0500 From: David Howells In-Reply-To: References: <20181127115246.00967523@canb.auug.org.au> To: Ondrej Mosnacek Cc: dhowells@redhat.com, Stephen Rothwell , Paul Moore , Al Viro , linux-next@vger.kernel.org, Linux kernel mailing list , selinux@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: linux-next: manual merge of the selinux tree with the vfs tree MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11580.1543590618.1@warthog.procyon.org.uk> Date: Fri, 30 Nov 2018 15:10:18 +0000 Message-ID: <11581.1543590618@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Ondrej Mosnacek wrote: > - if (fc->purpose == FS_CONTEXT_FOR_KERNEL_MOUNT) > + if (fc->purpose == (FS_CONTEXT_FOR_KERNEL_MOUNT|FS_CONTEXT_FOR_SUBMOUNT)) It's not a bitmask, so you can't do that. You'd need to do: if (fc->purpose == FS_CONTEXT_FOR_KERNEL_MOUNT || fc->purpose == FS_CONTEXT_FOR_SUBMOUNT) or use a switch. David