Re: [RFC v1 2/4] xfs: Introduce xfs_rtginodes_ensure_all()

Christoph Hellwig
2026-02-19T06:15:02Z

> +int
> +xfs_rtginodes_ensure_all(struct xfs_rtgroup *rtg)

Please use the usual XFS function definition style.

> +{
> + int i = 0;

The for loop already does this.

> + int error = 0;
> +
> + ASSERT(rtg);

The assert isn't needed.

> +
> + for (i = 0; i < XFS_RTGI_MAX; i++) {
> + error = xfs_rtginode_ensure(rtg, i);
> + if (error)
> + break;
> + }
> + return error;

Just return the error directly from the loop and 0 if you make it
through, then there is no need for the error initialization at the
top either.