]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfs: don't irele after failing to iget in xfs_attri_recover_work
authorDarrick J. Wong <djwong@kernel.org>
Mon, 23 Mar 2026 21:01:57 +0000 (14:01 -0700)
committerCarlos Maiolino <cem@kernel.org>
Thu, 26 Mar 2026 13:25:06 +0000 (14:25 +0100)
xlog_recovery_iget* never set @ip to a valid pointer if they return
an error, so this irele will walk off a dangling pointer.  Fix that.

Cc: stable@vger.kernel.org # v6.10
Fixes: ae673f534a3097 ("xfs: record inode generation in xattr update log intent items")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Long Li <leo.lilong@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_attr_item.c

index 82324f42537b5810782afd42b6410ea74a4726ed..deab14f31b38c25a6cd8fa740ed024a25d22cdb3 100644 (file)
@@ -653,7 +653,6 @@ xfs_attri_recover_work(
                break;
        }
        if (error) {
-               xfs_irele(ip);
                XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, attrp,
                                sizeof(*attrp));
                return ERR_PTR(-EFSCORRUPTED);