Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3439094imm; Fri, 25 May 2018 05:51:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq4MK1sP8LcLtf4tFJflquVd8oCyvh8TF8q8btNXFNbQnsGa64ZmjBfQ11FvOHG3dvdtmgg X-Received: by 2002:a17:902:b701:: with SMTP id d1-v6mr2530780pls.121.1527252717436; Fri, 25 May 2018 05:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527252717; cv=none; d=google.com; s=arc-20160816; b=McX3qXTnmFXNULePaXpjetXizlfWUU93UsDyAgRcL+myRMaRfH33MFjg/L1ZGfcffd Ad4FFkhKYoZuOwpp/pTOYkOZS8Pd3xnd0NOC1ccTPnL3DdcJftivmVqQfUbw7ZOwOTnO /zBeYAEUVts67oiXp56hjdjP8cvhX+9bevv90IxHkjRSJ+e9NsAnEFPja6r2PqB5+AXp 2Ahoq5e7loBYvfySmpYBuKNvp/ABE/dE/9VavYvL4NH4OUmCmN4Js3raYkd5JseXDnkt i2FfSmobrurVMmki2xz93dMHv2LiYe8SpsSZYLmTvSM6O29lHNC2dKKTPClrlFQIFd1P E6mA== 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=8KOs9kKsDMW0tk54TXbITKxS/7ndpOT4ygCtUO3uK+0=; b=GqQmW+GPR83mn75/FlAA3GyoSZOOueCY6GPA5HJWIMUtUNXxKiRiNUbn099yCnSfDn I/gpilNEpNfAJSamhck+zKpYhNIAMnj0eALEK5Ho+/N0O1TV/z85EHFXTuVcuShypGKp pEqT/4zpOqgmQRxw8H1h9QT889uYiOSPaECH2Oh2T34u/4n84Ff/EDfA7xj81hp4Qd1b cZi4mEbmESCFa5wJWSXMW1ZqW0WSujEjyGoMs2xWHYeO08xUHyCVJYImYs0qYvT6CRzN W5S3yqRR4hwVlOPanZqRkIOomd+BLMa0Ejnl+RxN8t3ecevkjh9hYbqMarZUgXC7SziZ kTGA== 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 b12-v6si23328454plk.327.2018.05.25.05.51.43; Fri, 25 May 2018 05:51:57 -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 S934280AbeEYMtt (ORCPT + 99 others); Fri, 25 May 2018 08:49:49 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35834 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933210AbeEYMtp (ORCPT ); Fri, 25 May 2018 08:49:45 -0400 Received: by mail-wm0-f66.google.com with SMTP id o78-v6so14368301wmg.0; Fri, 25 May 2018 05:49:44 -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=8KOs9kKsDMW0tk54TXbITKxS/7ndpOT4ygCtUO3uK+0=; b=SoaKkmzyLWb71Ppg04FBNSL3ZT+Uc1Uv6UXSHI4TVYlU7tBlrvY/hKTEQ/u2mryOYX mJjb4EZ88j0ZGgqTX+YNYoHnKt2yzfFLNbIF6gcvSI87mnlK+7SjXY8g/R3El75BIZ6M 6/r5z9IJhoAO6/M1OWaGI1Vzgfz1jFPpExnQM9URPBuON7+Bu4uJ1wFAn5SFFSPHNlRj 6x78HvgVJXgJdpBD4I42TnbvgGoU4r4Z2KpmDg7VkQpCWY1Sg9qE04AmnLTh7yyk/YnY r8vBhioW3cMtNuI4rApyTfVb4LUKynfn/u7gd4s3G9dAfD8UrK+iNH+W19xKILZtl9tq P64w== X-Gm-Message-State: ALKqPwdHg/2LGkprDld8LSuUVxzrM3SpDDlKYmqQZ8yNCo0iBOUU7KuM HdpscDWHHjUuTzkMdmftFauv7oG2qhs= X-Received: by 2002:a1c:3313:: with SMTP id z19-v6mr1574884wmz.48.1527252583531; Fri, 25 May 2018 05:49:43 -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.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 05:49:42 -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 2/6 v1 resend] statfs: use << to align with fs header Date: Fri, 25 May 2018 14:48:21 +0200 Message-Id: <20180525124825.23875-3-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 After switching to using bit-shifts to define MS_* flags switch over ST_* flags too. ST_* and MS_* flags generally have the exact same value. Initializing them identically let's userspace easily detect when flags indicate the same property but use a different value in doing so. Signed-off-by: Christian Brauner --- v0->v1: * non-functional changes: extend commit message --- include/linux/statfs.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/linux/statfs.h b/include/linux/statfs.h index 3142e98546ac..b336c04e793c 100644 --- a/include/linux/statfs.h +++ b/include/linux/statfs.h @@ -27,18 +27,18 @@ struct kstatfs { * ABI. The exception is ST_VALID which has the same value as MS_REMOUNT * which doesn't make any sense for statfs. */ -#define ST_RDONLY 0x0001 /* mount read-only */ -#define ST_NOSUID 0x0002 /* ignore suid and sgid bits */ -#define ST_NODEV 0x0004 /* disallow access to device special files */ -#define ST_NOEXEC 0x0008 /* disallow program execution */ -#define ST_SYNCHRONOUS 0x0010 /* writes are synced at once */ -#define ST_VALID 0x0020 /* f_flags support is implemented */ -#define ST_MANDLOCK 0x0040 /* allow mandatory locks on an FS */ -/* 0x0080 used for ST_WRITE in glibc */ -/* 0x0100 used for ST_APPEND in glibc */ -/* 0x0200 used for ST_IMMUTABLE in glibc */ -#define ST_NOATIME 0x0400 /* do not update access times */ -#define ST_NODIRATIME 0x0800 /* do not update directory access times */ -#define ST_RELATIME 0x1000 /* update atime relative to mtime/ctime */ +#define ST_RDONLY (1<<0) /* mount read-only */ +#define ST_NOSUID (1<<1) /* ignore suid and sgid bits */ +#define ST_NODEV (1<<2) /* disallow access to device special files */ +#define ST_NOEXEC (1<<3) /* disallow program execution */ +#define ST_SYNCHRONOUS (1<<4) /* writes are synced at once */ +#define ST_VALID (1<<5) /* f_flags support is implemented */ +#define ST_MANDLOCK (1<<6) /* allow mandatory locks on an FS */ +/* (1<<7) used for ST_WRITE in glibc */ +/* (1<<8) used for ST_APPEND in glibc */ +/* (1<<9) used for ST_IMMUTABLE in glibc */ +#define ST_NOATIME (1<<10) /* do not update access times */ +#define ST_NODIRATIME (1<<11) /* do not update directory access times */ +#define ST_RELATIME (1<<12) /* update atime relative to mtime/ctime */ #endif -- 2.17.0