From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Thu, 20 Feb 2020 07:47:41 -0800 Subject: [Cluster-devel] [PATCH v7 21/24] iomap: Restructure iomap_readpages_actor In-Reply-To: <20200219210103.32400-22-willy@infradead.org> References: <20200219210103.32400-1-willy@infradead.org> <20200219210103.32400-22-willy@infradead.org> Message-ID: <20200220154741.GB19577@infradead.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Feb 19, 2020 at 01:01:00PM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > By putting the 'have we reached the end of the page' condition at the end > of the loop instead of the beginning, we can remove the 'submit the last > page' code from iomap_readpages(). Also check that iomap_readpage_actor() > didn't return 0, which would lead to an endless loop. I'm obviously biassed a I wrote the original code, but I find the new very much harder to understand (not that the previous one was easy, this is tricky code..).