Re: [PATCH 2/2] xfs: pivot online scrub away from kmem.[ch]

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

 



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?

Otherwise:

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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