Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1580672pxb; Fri, 20 Aug 2021 08:50:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzchDzYON9bmku0zL0xPWOLXhb/U2l8xOGSfED6eioGqFkXawOo+U2ZuAr3EG6SoXXKTW24 X-Received: by 2002:a5d:81c1:: with SMTP id t1mr16652966iol.31.1629474601298; Fri, 20 Aug 2021 08:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629474601; cv=none; d=google.com; s=arc-20160816; b=wWgLtN1bg3v3eTOaZWNqUGiN/hXQTOxUgoYq8IIIxdbL/FfiunEpU7buvQZh0BoCxq ejkhnHmyU9bi0AS4uoDVH8vHUVSltKf4UL8DdBkl8HDHMVOR23pkihv2fBRYPoEYgyX6 o4yEG63SQKVeSVJuTk2VnGXKyBnR4VafzCuF13rXVx47Cz/WmXFz24ghpXyeSAqiKmBb deUs/tKda3mRm5yq9L+JiLsaL4mMSs0IrQXzMnMae4Z/z07SdUXMEmTY9r0JH9BDeI9r +8QMclkBXd7REwe4SUBqjGFUYTEG5e9SPwG/N61MM4wO6zogpH/f/TaAbUsPqPSYJL0Y KnLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=+EkeWHlxFRsvd+bdPYIl38VaVC2W+ltuq9+CECqHIeQ=; b=VKdSEt+Y04yTLENoICM2yNG0uAIUCEEKpvAB4MYWfiMcTV/HUITHSzsUj6r7XHhcf9 nshDz+OQyhpvnzI/SA8JhZR2/3OsBl1YJvVRJHwybACU/B+VpIn0SvPg61ek8u5GNFJ+ I+ECSz3Y20YVy0Ks2ZnVczsUYYyX9/n/alv9gH7+2sjhazd5WT87z87AfbrNctf9zGBV l1XcwjLAMBJIm4MGKSUXosO+EczJAgmNX000mrXMpciy3wgMROrgewpffiVOxOOj98zw fKiT6nLk/fGDlLnRjmglDcZtyNmWAG0jeowU4feZnT7f7hUnaRRuCgJpyBqR+D5K1584 VJ4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si6567244ila.112.2021.08.20.08.49.40; Fri, 20 Aug 2021 08:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241232AbhHTPuQ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 20 Aug 2021 11:50:16 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:59833 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241301AbhHTPuG (ORCPT ); Fri, 20 Aug 2021 11:50:06 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-131-DAGKzonBN4SYNa4fYJu3Dw-1; Fri, 20 Aug 2021 16:49:23 +0100 X-MC-Unique: DAGKzonBN4SYNa4fYJu3Dw-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 20 Aug 2021 16:49:22 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.023; Fri, 20 Aug 2021 16:49:22 +0100 From: David Laight To: 'Jeff Layton' , "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: RE: [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks Thread-Topic: [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks Thread-Index: AQHXlctJ2CxbK7rVbku/gUAYi8DQHat8icSQ Date: Fri, 20 Aug 2021 15:49:22 +0000 Message-ID: References: <20210820135707.171001-1-jlayton@kernel.org> <20210820135707.171001-2-jlayton@kernel.org> In-Reply-To: <20210820135707.171001-2-jlayton@kernel.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Jeff Layton > Sent: 20 August 2021 14:57 > > 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); > } If that is called more than once you don't want the 'inline'. I doubt it matters is not inlined - hardly a hot path. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)