From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Sun, 8 Jan 2023 09:32:38 -0800 Subject: [Cluster-devel] [PATCH v5 7/9] iomap/xfs: Eliminate the iomap_valid handler In-Reply-To: References: <20221231150919.659533-1-agruenba@redhat.com> <20221231150919.659533-8-agruenba@redhat.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Jan 04, 2023 at 07:08:17PM +0000, Matthew Wilcox wrote: > On Wed, Jan 04, 2023 at 09:53:17AM -0800, Darrick J. Wong wrote: > > I wonder if this should be reworked a bit to reduce indenting: > > > > if (PTR_ERR(folio) == -ESTALE) { > > FYI this is a bad habit to be in. The compiler can optimise > > if (folio == ERR_PTR(-ESTALE)) > > better than it can optimise the other way around. Yes. I think doing the recording that Darrick suggested combined with this style would be best: if (folio == ERR_PTR(-ESTALE)) { iter->iomap.flags |= IOMAP_F_STALE; return 0; } if (IS_ERR(folio)) return PTR_ERR(folio);