Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3440399imm; Fri, 25 May 2018 05:53:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqPbwljNkftVP9NK/L9p06KJSAX2zUcp+Au2pY+fGEJpXZ3TuIbIRWBWaBYXn3CjGfW3lQd X-Received: by 2002:a17:902:b696:: with SMTP id c22-v6mr2563542pls.262.1527252800531; Fri, 25 May 2018 05:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527252800; cv=none; d=google.com; s=arc-20160816; b=n1ayW2gtDascrmOo9zjp7WR4eRvenN1D+Wy7T8sAP2RWnMlIecFmOHdmypaAf8hGEO pZOZVYJFk1f12CvI+7yYPc9ERPkgF9YX+RU9HAL8pOMPAhdARrpSyK1GOtcBO664uOzH pnBkwvokMxjE8LAWI4qel+/dZbLrEHusQ8cu3ERvObn1GOCp0e7Bt0kzVEPdop5deMaD FbdG7vvq1hgfo+CdqC0+03Ex3qG/NK8CCHMtCY7r369pXqlnwnURk+HiaH5Um0A9KLy1 2gBaje5S7LIbYLnv5k2qfhtvOlVdJtTk//35on2Rf+02sTjbW+9Bz6gNS/F/kmMwsLvE HurQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=SZ01z1m7IJs03hHTvKX4kYQ1Sp76aYbMx9gEnrPPZ1I=; b=w9mOtPQmFcKf6Pb8hboV5jy4CiZGmnduB1Cbm1sbl4uyT6OqmN1VZssamGzuo44n// F7c+awf6xoldyVspoVZFbfXXRPt727X6w00gSfzuWv38KcDSossH1HRDqKN0ffSI/r11 8QbdtuG9sZHg6ZMYEaNLarLrbIho9qhW8ptI1r5m/UFZkoclwmbPK8Y++CoctFg2MwrE QDK0UYwsCXlzoc0X2TYHqFcCOiD7GZc2XvSGtC+8K5kozzV5pzFFS9YCvytiree7F7a0 DFy2oHe2wQwW4O4f3XQYvTyFoqayVrEDen2b1c8afMrm9aOmt36CfHSz4yGiaS0QTEkq GKcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si23832475pld.272.2018.05.25.05.53.05; Fri, 25 May 2018 05:53:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936060AbeEYMwO (ORCPT + 99 others); Fri, 25 May 2018 08:52:14 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55570 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbeEYMto (ORCPT ); Fri, 25 May 2018 08:49:44 -0400 Received: by mail-wm0-f66.google.com with SMTP id a8-v6so14070349wmg.5; Fri, 25 May 2018 05:49:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SZ01z1m7IJs03hHTvKX4kYQ1Sp76aYbMx9gEnrPPZ1I=; b=NhTbH7iCN/GpWqKsTsc06FmlsIVBCXvZaGNZZ61sQlu84sJyYCT1t0VgMl7a4vRD0E OiH51z8df/tlV77IMpYMjI9bpp8qfNnA3bkWWsnKuIgtTHWVhDAUREYIRKZTWTJM1dD0 2bNDrislSHSZlERiT1X/ksjaojOHJUMftkiNgbIqCJ6GF6+3tM3mDuNKn0CFktFKx1Ua 1s7bWfi2nYiMWaxoeaCk5oqW+RIdqRZJLxDDbHpdxDnJujuSZZ0nxlzTM+C9ifTDuzRu oRWEGiseThOcFNYjdKRMj3CLaHbqQd1768174X5rf3l2hLpjg5J/wbcm/x+r774LaZj6 12sg== X-Gm-Message-State: ALKqPwehpZ3/6J2N4NRk7CTp4kG7924UlELzq7ioeav8LeyAfEsP5XMv NOd/XHw4k6jQB6FnukVzCILZ5Gf2HKQ= X-Received: by 2002:a1c:7204:: with SMTP id n4-v6mr1584288wmc.138.1527252582133; Fri, 25 May 2018 05:49:42 -0700 (PDT) Received: from localhost.localdomain ([2a02:8070:8895:9700:c80a:973d:8254:7f55]) by smtp.gmail.com with ESMTPSA id u8-v6sm6053292wmc.40.2018.05.25.05.49.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 05:49:41 -0700 (PDT) From: Christian Brauner To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: torvalds@linux-foundation.org, tglx@linutronix.de, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, pombredanne@nexb.com, linux-api@vger.kernel.org, ebiederm@xmission.com, seth.forshee@canonical.com, viro@zeniv.linux.org.uk, Christian Brauner Subject: [PATCH 1/6 v1 resend] fs: use << for MS_* flags Date: Fri, 25 May 2018 14:48:20 +0200 Message-Id: <20180525124825.23875-2-christian@brauner.io> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180525124825.23875-1-christian@brauner.io> References: <20180525124825.23875-1-christian@brauner.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The definitions for MS_* flags are currently a mixture between hex values and bit-shifts. All higher values are already initialized with bit-shifts for MS_* constants starting with (1<<16). This patch switches the definitions for MS_* constants over to uniformly use bit-shifts. Note that the BIT() macro cannot be used as it is not exported to uapi files as was pointed out by gregkh. Signed-off-by: Christian Brauner --- v0->v1: * non-functional changes: extend commit message --- include/uapi/linux/fs.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index d2a8313fabd7..9662790a657c 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -105,22 +105,23 @@ struct inodes_stat_t { /* * These are the fs-independent mount-flags: up to 32 flags are supported */ -#define MS_RDONLY 1 /* Mount read-only */ -#define MS_NOSUID 2 /* Ignore suid and sgid bits */ -#define MS_NODEV 4 /* Disallow access to device special files */ -#define MS_NOEXEC 8 /* Disallow program execution */ -#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ -#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ -#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ -#define MS_DIRSYNC 128 /* Directory modifications are synchronous */ -#define MS_NOATIME 1024 /* Do not update access times. */ -#define MS_NODIRATIME 2048 /* Do not update directory access times */ -#define MS_BIND 4096 -#define MS_MOVE 8192 -#define MS_REC 16384 -#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence. - MS_VERBOSE is deprecated. */ -#define MS_SILENT 32768 +#define MS_RDONLY (1<<0) /* Mount read-only */ +#define MS_NOSUID (1<<1) /* Ignore suid and sgid bits */ +#define MS_NODEV (1<<2) /* Disallow access to device special files */ +#define MS_NOEXEC (1<<3) /* Disallow program execution */ +#define MS_SYNCHRONOUS (1<<4) /* Writes are synced at once */ +#define MS_REMOUNT (1<<5) /* Alter flags of a mounted FS */ +#define MS_MANDLOCK (1<<6) /* Allow mandatory locks on an FS */ +#define MS_DIRSYNC (1<<7) /* Directory modifications are synchronous */ +#define MS_NOATIME (1<<10) /* Do not update access times. */ +#define MS_NODIRATIME (1<<11) /* Do not update directory access times */ +#define MS_BIND (1<<12) +#define MS_MOVE (1<<13) +#define MS_REC (1<<14) +#define MS_VERBOSE (1<<15) /* War is peace. Verbosity is silence. + * MS_VERBOSE is deprecated. + */ +#define MS_SILENT (1<<15) #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ #define MS_UNBINDABLE (1<<17) /* change to unbindable */ #define MS_PRIVATE (1<<18) /* change to private */ -- 2.17.0