From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 C4484C4338F for ; Fri, 20 Aug 2021 19:46:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 37A416054E for ; Fri, 20 Aug 2021 19:46:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 37A416054E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C25806B0071; Fri, 20 Aug 2021 15:46:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD53D6B0072; Fri, 20 Aug 2021 15:46:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEBFD8D0001; Fri, 20 Aug 2021 15:46:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id 9329B6B0071 for ; Fri, 20 Aug 2021 15:46:17 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 32B13824C45C for ; Fri, 20 Aug 2021 19:46:17 +0000 (UTC) X-FDA: 78496490394.34.C869B78 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [142.44.231.140]) by imf27.hostedemail.com (Postfix) with ESMTP id CE3B77000091 for ; Fri, 20 Aug 2021 19:46:16 +0000 (UTC) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mHASE-00ESrA-C0; Fri, 20 Aug 2021 19:45:26 +0000 Date: Fri, 20 Aug 2021 19:45:26 +0000 From: Al Viro To: Jeff Layton Cc: torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, david@redhat.com, willy@infradead.org, linux-nfs@vger.kernel.org, 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, rostedt@goodmis.org Subject: Re: [PATCH v3 2/2] fs: remove mandatory file locking support Message-ID: References: <20210820163919.435135-1-jlayton@kernel.org> <20210820163919.435135-3-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210820163919.435135-3-jlayton@kernel.org> X-Rspamd-Queue-Id: CE3B77000091 Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=none (imf27.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 142.44.231.140) smtp.mailfrom=viro@ftp.linux.org.uk X-Rspamd-Server: rspam04 X-Stat-Signature: mxzdu8suedte5sjup7tyoja9kyndwru1 X-HE-Tag: 1629488776-762612 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: On Fri, Aug 20, 2021 at 12:39:19PM -0400, Jeff Layton wrote: > diff --git a/fs/locks.c b/fs/locks.c > @@ -2857,8 +2744,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl, > seq_puts(f, "POSIX "); > > seq_printf(f, " %s ", > - (inode == NULL) ? "*NOINODE*" : > - mandatory_lock(inode) ? "MANDATORY" : "ADVISORY "); > + (inode == NULL) ? "*NOINODE*" : "ADVISORY "); Huh? if (fl->fl_file != NULL) inode = locks_inode(fl->fl_file); So basically that's fl->fl_file ? "ADVISORY" : "*NOINODE*"? How could that trigger, though? With locks_mandatory_area() gone, I don't see how FL_POSIX file_lock with NULL ->fl_file could be ever found... Confused... Why is locks_copy_conflock() exported (hell, non-static), BTW? > diff --git a/fs/namespace.c b/fs/namespace.c > -#ifdef CONFIG_MANDATORY_FILE_LOCKING > -static bool may_mandlock(void) > +static void warn_mandlock(void) > { > - pr_warn_once("======================================================\n" > - "WARNING: the mand mount option is being deprecated and\n" > - " will be removed in v5.15!\n" > - "======================================================\n"); > - return capable(CAP_SYS_ADMIN); > + pr_warn_once("=======================================================\n" > + "WARNING: The mand mount option has been deprecated and\n" > + " and is ignored by this kernel. Remove the mand\n" > + " option from the mount to silence this warning.\n" > + "=======================================================\n"); > } > -#else > -static inline bool may_mandlock(void) > -{ > - pr_warn("VFS: \"mand\" mount option not supported"); > - return false; > -} > -#endif Is there any point in having the previous patch not folded into this one?