summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2026-02-18 15:25:36 -0800
committerSasha Levin <sashal@kernel.org>2026-03-12 07:09:42 -0400
commitb135cd653d1b80636f88b746539c53f46ee74e21 (patch)
treec132913647436f15087736f7a73bbb0bef3f6397 /fs
parent4e8935053ba389ae8d6685c10854d8021931bd89 (diff)
downloadlinux-b135cd653d1b80636f88b746539c53f46ee74e21.tar.gz
linux-b135cd653d1b80636f88b746539c53f46ee74e21.tar.bz2
linux-b135cd653d1b80636f88b746539c53f46ee74e21.zip
xfs: fix xfs_group release bug in xfs_dax_notify_dev_failure
commit eb8550fb75a875657dc29e3925a40244ec6b6bd6 upstream. Chris Mason reports that his AI tools noticed that we were using xfs_perag_put and xfs_group_put to release the group reference returned by xfs_group_next_range. However, the iterator function returns an object with an active refcount, which means that we must use the correct function to release the active refcount, which is _rele. Cc: <stable@vger.kernel.org> # v6.0 Fixes: 6f643c57d57c56 ("xfs: implement ->notify_failure() for XFS") Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Carlos Maiolino <cem@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_notify_failure.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_notify_failure.c b/fs/xfs/xfs_notify_failure.c
index b17672889942..0700a723f38e 100644
--- a/fs/xfs/xfs_notify_failure.c
+++ b/fs/xfs/xfs_notify_failure.c
@@ -293,7 +293,7 @@ xfs_dax_notify_dev_failure(
error = xfs_alloc_read_agf(pag, tp, 0, &agf_bp);
if (error) {
- xfs_perag_put(pag);
+ xfs_perag_rele(pag);
break;
}
@@ -329,7 +329,7 @@ xfs_dax_notify_dev_failure(
if (rtg)
xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_RMAP);
if (error) {
- xfs_group_put(xg);
+ xfs_group_rele(xg);
break;
}
}