On Fri, Oct 14, 2022 at 09:42:20AM +1100, Dave Chinner wrote: > On Sun, Oct 02, 2022 at 11:19:52AM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > Convert all the online scrub code to use the Linux slab allocator > > functions directly instead of going through the kmem wrappers. > > > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > > ..... > > > --- > > diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c > > index 2f4519590dc1..566a093b2cf3 100644 > > --- a/fs/xfs/scrub/btree.c > > +++ b/fs/xfs/scrub/btree.c > > @@ -431,10 +431,10 @@ xchk_btree_check_owner( > > * later scanning. > > */ > > if (cur->bc_btnum == XFS_BTNUM_BNO || cur->bc_btnum == XFS_BTNUM_RMAP) { > > - co = kmem_alloc(sizeof(struct check_owner), > > - KM_MAYFAIL); > > + co = kmalloc(sizeof(struct check_owner), XCHK_GFP_FLAGS); > > if (!co) > > return -ENOMEM; > > + INIT_LIST_HEAD(&co->list); > > Fixes some other bug? > > It's obvious that it should be initialised, so I'm not concerned > about it being here, just checking that you intended to fix this > here and it doesn't belong to some other patchset? Yeah, it'll fix list debugging tripping over the unininitialized list_head. I probably should've made that a separate oneliner but... eh. There are already too many patches. --D > Otherwise: > > Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> > > -- > Dave Chinner > david@xxxxxxxxxxxxx