Message ID | 20230302011035.4928-1-dakr@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3968932wrd; Wed, 1 Mar 2023 17:13:41 -0800 (PST) X-Google-Smtp-Source: AK7set/U8r96nXu+639chroHOYhUf+lUYIMJWDtfXWShWWFytVbQ+ikGK664bDe5N/Lrb9sJEwZs X-Received: by 2002:a17:907:7759:b0:8b1:76dd:f5f6 with SMTP id kx25-20020a170907775900b008b176ddf5f6mr10074242ejc.50.1677719621189; Wed, 01 Mar 2023 17:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677719621; cv=none; d=google.com; s=arc-20160816; b=KfiYRPQqGYdzWnqoNCcrm6R03mIgInZ99r5y+3aiJgYHMLXGEFGt9jno3nWoKPu4pj j25vwuP3xJH6O9521Mot0pqQ5UXAodRC+2/CKteAzY//HGbPgwULth/E8linfZLoNths tfJ63Z/WDgeQBNsma1DXnbFk+C7sEnHIYyJ7LQQm6uF+mMPeA8gkvOoaWbNmpuKiauBX bBrsedKCZ9PYVEX0pL8VkXpOLi2ucUaT4X/YdbqmKGbDg7K8WDRT7YhfG83bo2yZoDIM 3qcxbAv79NQ00EUBgiBv5pV7bEEvmJrwQUGdyLJSXaqn3n5qRuaNDplIzJHjHZLLiFeQ ZC2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cnHHltz+FYOGt7sz4GByaHxQ6kD/wFuAdG0z56vTAmQ=; b=OkVUoL9WstyfjrCj28H6kVOxqEvy1zt1WVrwPcAsCkLe8BKHGyS7Qm1TUMc4Vnbue+ pFXvVokmE/oGLluMrA7/kETd+h3jfhZ0SJ+ckuDKLbtQpfqIDa0IVm3vkUJ/wu933+/r 1Nlrv1tTZhD/53hqdyrvIpTZtHaFBayt3d2QtSjknrU/rt/tevZ70Cmpl+NSGlT2czmi PTqvpYW439Djdt/dAoCpMpWPaeQ7G1sQpm1iTmEJFC3g2IMG/cezpyGNbf9a+fTO+Tpc QTOfXQrNo1FcWCSy8P8baIt7hMTd3hG/mu2mULuKH1gEhfW0xr86xV2iZF6MAU1EIEr4 faWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=czlSOupA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a170906230a00b008e10c06e930si3931021eja.549.2023.03.01.17.13.18; Wed, 01 Mar 2023 17:13:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=czlSOupA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjCBBLa (ORCPT <rfc822;davidbtadokoro@gmail.com> + 99 others); Wed, 1 Mar 2023 20:11:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjCBBL3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 1 Mar 2023 20:11:29 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B4F16ACD for <linux-kernel@vger.kernel.org>; Wed, 1 Mar 2023 17:10:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677719440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=cnHHltz+FYOGt7sz4GByaHxQ6kD/wFuAdG0z56vTAmQ=; b=czlSOupAVjZ73QqT28BIhPJC8+liPmJOitUALrlnOeiloUUB1bhLf0kowe9LXvCdnIDfvV wjuJX2ZUFQZZBylF/TG9jFTLYlm//EW8WRjlSN9hY6IACJXZoerHIoTzIrT7buMA9bO1U2 y+xGBKAX20pVbZ63ql8seNS8ITYu2UU= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-112-Oes6U4NmOv2GP5DIKo1Xxg-1; Wed, 01 Mar 2023 20:10:39 -0500 X-MC-Unique: Oes6U4NmOv2GP5DIKo1Xxg-1 Received: by mail-ed1-f72.google.com with SMTP id h13-20020a0564020e8d00b004a26ef05c34so21767470eda.16 for <linux-kernel@vger.kernel.org>; Wed, 01 Mar 2023 17:10:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cnHHltz+FYOGt7sz4GByaHxQ6kD/wFuAdG0z56vTAmQ=; b=J79QfNbR7OM8xSCjCM90fkI8/GM2Co81Zbv4IFbuSXDWfsQHsm9dHSbjRzU9Iv/aqI 2RjrBFqWKpra63O5G/nlI4FdgrZYWLYWvQ8+Z/O92WdHIEeuZBlbmjW3LFnlENnxv5S1 GTmKxYTzL9tZDChRG/tFcDwGwYPS6pXBHSScx20UzkVKOqGYWMQprgAUpE+72Jj3XR+a OES7LN3zbKMW3koN/W2rYHQlkavMZgbRx1yuLltxVDUUN+BQpU5ajJCnAzI0AxVI7oeP c+N4A8JtLYO9/v3VMoi7oM9XjOcDUPngimRzRJTHJyQ98ww/WP1dgn/6rSuFkmm2FaM3 2ZRA== X-Gm-Message-State: AO0yUKX5WTGEiYbyWG17UHMRJ2Qeq1nhURlkFU87f7+gE5LNUyJ5YSoq 5SjrW3X8ZHdM+1uS3KKS/ZtVvXSg/uSTT5pz/XJav84nW3r/Hf+EcVy61R0GjqvhgQB+NC6VCbO a882teQU8+0iwjQv+e8mqJS0h X-Received: by 2002:a17:907:982:b0:7d3:c516:6ef4 with SMTP id bf2-20020a170907098200b007d3c5166ef4mr11973456ejc.20.1677719438419; Wed, 01 Mar 2023 17:10:38 -0800 (PST) X-Received: by 2002:a17:907:982:b0:7d3:c516:6ef4 with SMTP id bf2-20020a170907098200b007d3c5166ef4mr11973432ejc.20.1677719438139; Wed, 01 Mar 2023 17:10:38 -0800 (PST) Received: from cassiopeiae.. ([2a02:810d:4b3f:de78:642:1aff:fe31:a19f]) by smtp.gmail.com with ESMTPSA id gr16-20020a170906e2d000b008eb5b085075sm6355004ejb.122.2023.03.01.17.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 17:10:37 -0800 (PST) From: Danilo Krummrich <dakr@redhat.com> To: Liam.Howlett@oracle.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Danilo Krummrich <dakr@redhat.com> Subject: [PATCH] maple_tree: export symbol mas_preallocate() Date: Thu, 2 Mar 2023 02:10:35 +0100 Message-Id: <20230302011035.4928-1-dakr@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759216529504571611?= X-GMAIL-MSGID: =?utf-8?q?1759216529504571611?= |
Series |
maple_tree: export symbol mas_preallocate()
|
|
Commit Message
Danilo Krummrich
March 2, 2023, 1:10 a.m. UTC
Fix missing EXPORT_SYMBOL_GPL() statement for mas_preallocate().
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
---
lib/maple_tree.c | 1 +
1 file changed, 1 insertion(+)
Comments
Thanks for the patch. This should indeed be exported. Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> * Danilo Krummrich <dakr@redhat.com> [230301 20:10]: > Fix missing EXPORT_SYMBOL_GPL() statement for mas_preallocate(). > > Signed-off-by: Danilo Krummrich <dakr@redhat.com> > --- > lib/maple_tree.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/maple_tree.c b/lib/maple_tree.c > index 26e2045d3cda..3bfb8a6f3f6d 100644 > --- a/lib/maple_tree.c > +++ b/lib/maple_tree.c > @@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp) > mas_reset(mas); > return ret; > } > +EXPORT_SYMBOL_GPL(mas_preallocate); > > /* > * mas_destroy() - destroy a maple state. > -- > 2.39.2 >
On 3/2/23 02:52, Liam R. Howlett wrote: > Thanks for the patch. This should indeed be exported. > > Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> What uses it? Don't we export only things used by in-kernel modules? > * Danilo Krummrich <dakr@redhat.com> [230301 20:10]: >> Fix missing EXPORT_SYMBOL_GPL() statement for mas_preallocate(). >> >> Signed-off-by: Danilo Krummrich <dakr@redhat.com> >> --- >> lib/maple_tree.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/maple_tree.c b/lib/maple_tree.c >> index 26e2045d3cda..3bfb8a6f3f6d 100644 >> --- a/lib/maple_tree.c >> +++ b/lib/maple_tree.c >> @@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp) >> mas_reset(mas); >> return ret; >> } >> +EXPORT_SYMBOL_GPL(mas_preallocate); >> >> /* >> * mas_destroy() - destroy a maple state. >> -- >> 2.39.2 >> >
On 3/8/23 11:59, Vlastimil Babka wrote: > On 3/2/23 02:52, Liam R. Howlett wrote: >> Thanks for the patch. This should indeed be exported. >> >> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> > > What uses it? Don't we export only things used by in-kernel modules? mas_preallocate() is part of the maple tree's 'Advanced API'. All other functions of this API are exported already. More specifically, e.g. mas_store_prealloc() is exported which doesn't make a lot of sense without mas_preallocate() being available too. I don't think it is used outside of mm yet, but as a generic tree implementation maple tree is pretty likely to be used in code built as module, e.g. drivers. > >> * Danilo Krummrich <dakr@redhat.com> [230301 20:10]: >>> Fix missing EXPORT_SYMBOL_GPL() statement for mas_preallocate(). >>> >>> Signed-off-by: Danilo Krummrich <dakr@redhat.com> >>> --- >>> lib/maple_tree.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/lib/maple_tree.c b/lib/maple_tree.c >>> index 26e2045d3cda..3bfb8a6f3f6d 100644 >>> --- a/lib/maple_tree.c >>> +++ b/lib/maple_tree.c >>> @@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp) >>> mas_reset(mas); >>> return ret; >>> } >>> +EXPORT_SYMBOL_GPL(mas_preallocate); >>> >>> /* >>> * mas_destroy() - destroy a maple state. >>> -- >>> 2.39.2 >>> >> >
On Wed, Mar 08, 2023 at 03:34:29PM +0100, Danilo Krummrich wrote: > On 3/8/23 11:59, Vlastimil Babka wrote: >> On 3/2/23 02:52, Liam R. Howlett wrote: >>> Thanks for the patch. This should indeed be exported. >>> >>> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> >> >> What uses it? Don't we export only things used by in-kernel modules? > > mas_preallocate() is part of the maple tree's 'Advanced API'. All other > functions of this API are exported already. > > More specifically, e.g. mas_store_prealloc() is exported which doesn't make > a lot of sense without mas_preallocate() being available too. > > I don't think it is used outside of mm yet, but as a generic tree > implementation maple tree is pretty likely to be used in code built as > module, e.g. drivers. If anyone wants to use they can add the export as needed.
On 3/8/23 15:43, Christoph Hellwig wrote: > On Wed, Mar 08, 2023 at 03:34:29PM +0100, Danilo Krummrich wrote: >> On 3/8/23 11:59, Vlastimil Babka wrote: >>> On 3/2/23 02:52, Liam R. Howlett wrote: >>>> Thanks for the patch. This should indeed be exported. >>>> >>>> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> >>> >>> What uses it? Don't we export only things used by in-kernel modules? >> >> mas_preallocate() is part of the maple tree's 'Advanced API'. All other >> functions of this API are exported already. >> >> More specifically, e.g. mas_store_prealloc() is exported which doesn't make >> a lot of sense without mas_preallocate() being available too. >> >> I don't think it is used outside of mm yet, but as a generic tree >> implementation maple tree is pretty likely to be used in code built as >> module, e.g. drivers. > > If anyone wants to use they can add the export as needed. > Valid perception, though personally I wouldn't share it in this specific case. Anyway, it's just that all other functions of the 'Advanced API' are exported already without them having other users than mm either, e.g. mas_store_prealloc() can't be used without mas_preallocate(), hence exporting one, but not the other doesn't really make sense. Consistency wise I think we should either also export mas_preallocate() or don't export the other ones either.
On Wed, Mar 08, 2023 at 04:18:55PM +0100, Danilo Krummrich wrote: > Consistency wise I think we should either also export mas_preallocate() or > don't export the other ones either. Please send a patch to drop all unused exports.
On Wed, Mar 08, 2023 at 04:29:13PM +0100, Christoph Hellwig wrote: > On Wed, Mar 08, 2023 at 04:18:55PM +0100, Danilo Krummrich wrote: > > Consistency wise I think we should either also export mas_preallocate() or > > don't export the other ones either. > > Please send a patch to drop all unused exports. While that's usually a good rule, it just creates unnecessary friction in this kind of case -- a set of library functions which have only been introduced in the last few months. If they're still unused in a year, sure, let's get rid of the exports.
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 26e2045d3cda..3bfb8a6f3f6d 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp) mas_reset(mas); return ret; } +EXPORT_SYMBOL_GPL(mas_preallocate); /* * mas_destroy() - destroy a maple state.