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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 40A17C433FF for ; Wed, 14 Aug 2019 23:36:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A6422084D for ; Wed, 14 Aug 2019 23:36:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727913AbfHNXgd (ORCPT ); Wed, 14 Aug 2019 19:36:33 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:50300 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfHNXgd (ORCPT ); Wed, 14 Aug 2019 19:36:33 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hy2oi-0001fi-CO; Wed, 14 Aug 2019 23:36:32 +0000 Date: Thu, 15 Aug 2019 00:36:32 +0100 From: Al Viro To: Sascha Hauer Cc: linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, Jan Kara , Richard Weinberger , kernel@pengutronix.de Subject: Re: [PATCH 05/11] quota: Allow to pass quotactl a mountpoint Message-ID: <20190814233632.GW1131@ZenIV.linux.org.uk> References: <20190814121834.13983-1-s.hauer@pengutronix.de> <20190814121834.13983-6-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190814121834.13983-6-s.hauer@pengutronix.de> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Aug 14, 2019 at 02:18:28PM +0200, Sascha Hauer wrote: > +/** > + * reference_super - get a reference to a given superblock > + * @sb: superblock to get the reference from > + * > + * Takes a reference to a superblock. Can be used as when the superblock > + * is known and leaves it in a state as if get_super had been called. > + */ > +void reference_super(struct super_block *sb) > +{ > + spin_lock(&sb_lock); > + sb->s_count++; > + spin_unlock(&sb_lock); > + > + down_read(&sb->s_umount); > +} > +EXPORT_SYMBOL_GPL(reference_super); NAK, for a plenty of reasons 1) introduction of EXPORT_SYMBOL_GPL garbage 2) aforementioned garbage on something that doesn't need to be exported 3) *way* too easily abused - get_super() is, at least, not tempting to play with in random code. This one is, and it's too low-level to allow.