]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
xfs: fix scrub trace with null pointer in quotacheck
authorAndrey Albershteyn <aalbersh@redhat.com>
Thu, 31 Jul 2025 17:07:22 +0000 (19:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:30:54 +0000 (18:30 +0200)
commit 5d94b19f066480addfcdcb5efde66152ad5a7c0e upstream.

The quotacheck doesn't initialize sc->ip.

Cc: stable@vger.kernel.org # v6.8
Fixes: 21d7500929c8a0 ("xfs: improve dquot iteration for scrub")
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/scrub/trace.h

index da773fee8638afaaa92986da5ff358275cb8070d..2fbc8508ccdf81b05a7468dc1ecd7b4d6ada9ccc 100644 (file)
@@ -467,7 +467,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;