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 2C975EB64DC for ; Tue, 27 Jun 2023 04:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229789AbjF0EcC (ORCPT ); Tue, 27 Jun 2023 00:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjF0Eb7 (ORCPT ); Tue, 27 Jun 2023 00:31:59 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B36601716; Mon, 26 Jun 2023 21:31:58 -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=a2dR7xpPIXwa7mgxrA3ZYrC24teMCgTKOM+0t+zuPts=; b=NAnu0sELXqjPhTmBs+owObHvJ1 Y8QXdx/O0B8x9h7c8zwr9S/aT3AzDtTSi6yj9ZU5tvT4HjQcFd/ZPyuif5a7LIMPkrQVOaCS80w2C /fVxFqPBAy371n2w84c/K69IY3QaDcrZtVPJfatNWhQDEjFM1oConavbkIJjsZsQXOZeo2jYLOD+9 BbJB/NpLw22IILLQHoKBoyTsDMrVaN1s65BkvkB17qym3YNhoAEZYP1Eczk6KHeAUAdVAJducqCzd fzs7eGHb+dD64gL6Was8/8odNLBv4ySJlu0W2RqmgyTFXCfe1nb0ZsRdf0MMzWHhJ92ZcdRQccpcO YhDDW2/w==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qE0Mu-00BhBJ-31; Tue, 27 Jun 2023 04:31:56 +0000 Date: Mon, 26 Jun 2023 21:31:56 -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 07/12] writeback: Factor writeback_iter_init() out of write_cache_pages() Message-ID: References: <20230626173521.459345-1-willy@infradead.org> <20230626173521.459345-8-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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-kernel@vger.kernel.org On Mon, Jun 26, 2023 at 09:30:07PM -0700, Christoph Hellwig wrote: > On Mon, Jun 26, 2023 at 06:35:16PM +0100, Matthew Wilcox (Oracle) wrote: > > + for (folio = writeback_iter_init(mapping, wbc); > > + folio; > > + folio = writeback_get_next(mapping, wbc)) { > > Ok that's another way to structure it. Guess I should look over the > whole series first.. That beeing said. Given that writeback_iter_init calls writeback_get_next anyway, writeback_iter_init(mapping, wbc); while ((folio = writeback_get_next(mapping, wbc))) still feels a little easier to follow to be. No hard feelings either way, just an observation.