Re: [PATCH 5/6] xfs: move the fork format fields into struct xfs_ifork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 14, 2020 at 02:25:41PM -0700, Darrick J. Wong wrote:

[~1000 lines of fullquote deleted until I hit the first comment, sigh..]

> > diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
> > index 157f72efec5e9..dfa1533b4edfc 100644
> > --- a/fs/xfs/scrub/bmap.c
> > +++ b/fs/xfs/scrub/bmap.c
> > @@ -598,7 +598,7 @@ xchk_bmap_check_rmaps(
> >  		size = 0;
> >  		break;
> >  	}
> > -	if (XFS_IFORK_FORMAT(sc->ip, whichfork) != XFS_DINODE_FMT_BTREE &&
> > +	if (ifp->if_format != XFS_DINODE_FMT_BTREE &&
> 
> ifp can be null here if bmapbt scrub is called on a file that has no
> xattrs; this crashed my test vm immediately...

What tests is that?  And xfstests auto run did not hit it, even if a
NULL check here seems sensible.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux