Re: [PATCH 3/3] xfs: actually check xfs_btree_check_block return in xfs_btree_islastblock

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

 



> +/* Does this cursor point to the last block in the given level? */

I think this comment is unnecessary tbh, the function's definition looks pretty
clear to me already.

> +static inline bool
> +xfs_btree_islastblock(
> +	xfs_btree_cur_t		*cur,
> +	int			level)
> +{
> +	struct xfs_btree_block	*block;
> +	struct xfs_buf		*bp;
> +
> +	block = xfs_btree_get_block(cur, level, &bp);

And here it might be useful for the future, to remind us why do we check it
inside an assertion, something like:

	/* Caller is already supposed to have done a lookup/seek op */
> +	ASSERT(block && xfs_btree_check_block(cur, block, level, bp) == 0);
> +

But, these are just nitpicks, and since I didn't see any review on this patch
yet, you can add with or without the suggestions above:

Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>

Cheers.

-- 
Carlos





[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