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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4533EB64D9 for ; Tue, 27 Jun 2023 04:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbjF0E0x (ORCPT ); Tue, 27 Jun 2023 00:26:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbjF0E0d (ORCPT ); Tue, 27 Jun 2023 00:26:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D52073A8C; Mon, 26 Jun 2023 21:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=X0O5D4A4BzDv3g6F+hWrfTtn7WMWd5+asdpXbkJ+CvU=; b=o9VxntFVUrtjl9KyiH5GLIK63h M4ugJRCobRFr7lzpbASn1T7e3WySQofX+YWms0U5z08zQNlL1npMhtv/0yJDDYlxyAjF+1F7F7GcY ZCouKPEE8WXQgs6G1pYTN6dYcnm05xBXnkjTJ4VQ0zBuVFE2aSi4dGA2Zy3ZCrfTKP7iiWI8aRxXy QxfGPusR+9kNm7+YkRn/n4Nq9TNn76FhWRhiiidhU0vU3WqrQWP+NDXeQzDE6lQitim+d94grbjNF VPw/gPz9cQkAgtBfFWK8KhAwQwVXXtOgiOTt2et2IgXUjUHC+08a0t+d+N3umJtARvrtmQrIcLH5P U9Vj9E2Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qE0GD-00BghN-0h; Tue, 27 Jun 2023 04:25:01 +0000 Date: Mon, 26 Jun 2023 21:25:01 -0700 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , David Howells Subject: Re: [PATCH 06/12] writeback: Use the folio_batch queue iterator Message-ID: References: <20230626173521.459345-1-willy@infradead.org> <20230626173521.459345-7-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230626173521.459345-7-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Jun 26, 2023 at 06:35:15PM +0100, Matthew Wilcox (Oracle) wrote: > Instead of keeping our own local iterator variable, use the one just > added to folio_batch. Ok, that's a slightly different twist to what I just suggested. > for (;;) { > - struct folio *folio; > + struct folio *folio = writeback_get_next(mapping, wbc); > > + if (!folio) > break; But as a purely cosmetic nit I still think this would read nicer as: while ((folio = writeback_get_next(mapping, wbc))) {