Re: [PATCH 03/10] xfs: improve the xfs_dabuf_map calling conventions

Christoph Hellwig
2019-11-20T18:20:39Z

On Wed, Nov 20, 2019 at 10:17:08AM -0800, Darrick J. Wong wrote:
> > - error = xfs_dabuf_map(dp, bno, mappedbno, whichfork,
> > - &mapp, &nmap);
> > + error = xfs_dabuf_map(dp, bno,
> > + mappedbno == -1 ? XFS_DABUF_MAP_HOLE_OK : 0,
> > + whichfork, &mapp, &nmap);
> > if (error) {
> > /* mapping a hole is not an error, but we don't continue */
> > - if (error == -1)
> > + if (error == -ENOENT)
>
> Shouldn't this turn into:
>
> if (error || !nmap)
> goto out_free;
>
> Otherwise looks ok to me.

Yes, it should. Looks like that hunk got lost in the reshuffle.