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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 DBC5CC4361B for ; Mon, 7 Dec 2020 13:57:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F98A23444 for ; Mon, 7 Dec 2020 13:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725960AbgLGN5Z (ORCPT ); Mon, 7 Dec 2020 08:57:25 -0500 Received: from verein.lst.de ([213.95.11.211]:41950 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgLGN5Y (ORCPT ); Mon, 7 Dec 2020 08:57:24 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 6364267373; Mon, 7 Dec 2020 14:56:42 +0100 (CET) Date: Mon, 7 Dec 2020 14:56:42 +0100 From: Christoph Hellwig To: Gao Xiang Cc: linux-xfs@vger.kernel.org, "Darrick J. Wong" , Dave Chinner , Christoph Hellwig , Eric Sandeen , Dave Chinner Subject: Re: [PATCH v3 5/6] xfs: spilt xfs_dialloc() into 2 functions Message-ID: <20201207135642.GF29249@lst.de> References: <20201207001533.2702719-1-hsiangkao@redhat.com> <20201207001533.2702719-6-hsiangkao@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201207001533.2702719-6-hsiangkao@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org > if (pag->pagi_freecount) { > xfs_perag_put(pag); > + *IO_agbp = agbp; > + return 0; I think assigning *IO_agbp would benefit from a little consolidation. Set it to NULL in the normal unsuccessful return, and add a found_ag label that assigns agbp and returns 0. Otherwise looks good: Reviewed-by: Christoph Hellwig