Re: [PATCH RFC 26/29] xfs: fix scrub trace with null pointer in quotacheck

Darrick J. Wong
2025-07-29T15:28:40Z

On Mon, Jul 28, 2025 at 10:30:30PM +0200, Andrey Albershteyn wrote:
> The quotacheck doesn't initialize sc->ip.
>
> Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>

Looks good,
Cc: <stable@vger.kernel.org> # v6.8
Fixes: 21d7500929c8a0 ("xfs: improve dquot iteration for scrub")
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
> fs/xfs/scrub/trace.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h
> index d7c4ced47c15..4368f08e91c6 100644
> --- a/fs/xfs/scrub/trace.h
> +++ b/fs/xfs/scrub/trace.h
> @@ -479,7 +479,7 @@ DECLARE_EVENT_CLASS(xchk_dqiter_class,
> __field(xfs_exntst_t, state)
> ),
> TP_fast_assign(
> - __entry->dev = cursor->sc->ip->i_mount->m_super->s_dev;
> + __entry->dev = cursor->sc->mp->m_super->s_dev;
> __entry->dqtype = cursor->dqtype;
> __entry->ino = cursor->quota_ip->i_ino;
> __entry->cur_id = cursor->id;
>
> --
> 2.50.0
>
>