From patchwork Fri Aug 20 13:57:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 12449261 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6EE0C19F33 for ; Fri, 20 Aug 2021 13:57:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 508EA61167 for ; Fri, 20 Aug 2021 13:57:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 508EA61167 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id EB7908D0001; Fri, 20 Aug 2021 09:57:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E481B6B0074; Fri, 20 Aug 2021 09:57:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B87228D0002; Fri, 20 Aug 2021 09:57:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0116.hostedemail.com [216.40.44.116]) by kanga.kvack.org (Postfix) with ESMTP id 95AE26B0072 for ; Fri, 20 Aug 2021 09:57:13 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 33A5A184B28E6 for ; Fri, 20 Aug 2021 13:57:13 +0000 (UTC) X-FDA: 78495610746.25.ECD8DFE Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf27.hostedemail.com (Postfix) with ESMTP id E31F1700009E for ; Fri, 20 Aug 2021 13:57:12 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 8A4716113B; Fri, 20 Aug 2021 13:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629467832; bh=K8+S905uGyASJbRSp6ojxzz8FSVJlwShMqh++FTbeUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mzn3O26so+FuhVw9kHhMyXbJ5ZEiAo0PLzc8znPDyofGJr9WSUruQkDieoWUYaU0g 5bKhOWsLm0DBeAbyngiuAJbN9y0xKY0sjzJtvpNBYLnAPfwY9cVgEEYvY3gIcxx1aG uglOfDqvS4n6ts6K6paZ1uIVdX0VHYlnRMdjUKDqmkiY4gBiZG7/Xb40VIUcxWLOp9 cXBVs8kjfJgj75iIMaPHLo2zZhELKAv0XgIsvt23fO5qwLfZZmicS1SCpwaDMMvaFe zxr49yGgO9JZR7elr/JBfGxd+YVB7AjEWSD30wNOM3My7Dprk6gS2/Cx5Rf52Z6Gpj ouUDTAjvDHXgQ== From: Jeff Layton To: torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ebiederm@xmission.com, david@redhat.com, willy@infradead.org, linux-nfs@vger.kernel.org, viro@zeniv.linux.org.uk, linux-doc@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-afs@lists.infradead.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, linux-mm@kvack.org, akpm@linux-foundation.org, luto@kernel.org, bfields@fieldses.org, w@1wt.eu, rostedt@goodmis.org, stable@vger.kernel.org Subject: [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks Date: Fri, 20 Aug 2021 09:57:06 -0400 Message-Id: <20210820135707.171001-2-jlayton@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210820135707.171001-1-jlayton@kernel.org> References: <20210820135707.171001-1-jlayton@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: E31F1700009E Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mzn3O26s; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of jlayton@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=jlayton@kernel.org X-Rspamd-Server: rspam04 X-Stat-Signature: k3z3tt1wi6gc5o4hsg97hdp8hpqx787r X-HE-Tag: 1629467832-745368 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros have disabled it. Warn the stragglers that still use "-o mand" that we'll be dropping support for that mount option. Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton --- fs/namespace.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/namespace.c b/fs/namespace.c index ab4174a3c802..ffab0bb1e649 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1716,8 +1716,16 @@ static inline bool may_mount(void) } #ifdef CONFIG_MANDATORY_FILE_LOCKING +static bool warned_mand; static inline bool may_mandlock(void) { + if (!warned_mand) { + warned_mand = true; + pr_warn("======================================================\n"); + pr_warn("WARNING: the mand mount option is being deprecated and\n"); + pr_warn(" will be removed in v5.15!\n"); + pr_warn("======================================================\n"); + } return capable(CAP_SYS_ADMIN); } #else