Re: [PATCH 02/26] xfs: refactor loading quota inodes in the regular case

Christoph Hellwig
2024-08-23T04:31:58Z

> + xfs_ino_t ino = NULLFSINO;
> +
> + switch (type) {
> + case XFS_DQTYPE_USER:
> + ino = mp->m_sb.sb_uquotino;
> + break;
> + case XFS_DQTYPE_GROUP:
> + ino = mp->m_sb.sb_gquotino;
> + break;
> + case XFS_DQTYPE_PROJ:
> + ino = mp->m_sb.sb_pquotino;
> + break;
> + default:
> + ASSERT(0);
> + return -EFSCORRUPTED;
> + }

I'd probably split this type to ino lookup into a separate helper,
but that doesn't really matter.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>