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=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 A7DC2C3A589 for ; Tue, 20 Aug 2019 23:57:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 832E2206B6 for ; Tue, 20 Aug 2019 23:57:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726501AbfHTX5b (ORCPT ); Tue, 20 Aug 2019 19:57:31 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:53098 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726141AbfHTX5b (ORCPT ); Tue, 20 Aug 2019 19:57:31 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 9F80614DB4E8E; Tue, 20 Aug 2019 16:57:30 -0700 (PDT) Date: Tue, 20 Aug 2019 16:57:28 -0700 (PDT) Message-Id: <20190820.165728.2062957580528299761.davem@davemloft.net> To: willy@infradead.org Cc: netdev@vger.kernel.org Subject: Re: [PATCH 23/38] cls_api: Convert tcf_net to XArray From: David Miller In-Reply-To: <20190820223259.22348-24-willy@infradead.org> References: <20190820223259.22348-1-willy@infradead.org> <20190820223259.22348-24-willy@infradead.org> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 20 Aug 2019 16:57:30 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Matthew Wilcox Date: Tue, 20 Aug 2019 15:32:44 -0700 > From: "Matthew Wilcox (Oracle)" > > This module doesn't use the allocating functionality; convert it to a > plain XArray instead of an allocating one. I've left struct tcf_net > in place in case more objects are added to it in future, although > it now only contains an XArray. We don't need to call xa_destroy() > if the array is empty, so I've removed the contents of tcf_net_exit() > -- if it can be called with entries still in place, then it shoud call > xa_destroy() instead. > > Signed-off-by: Matthew Wilcox (Oracle) I don't know if the net exit can be invoked with entires still in place, however if the tcf_net_exit() function is made empty it should be removed along with the assignment to the per-netns ops.