From 372aa942c32c7c718d2af9622b1d431a8a120d11 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Sun, 15 Dec 2024 18:18:42 -0800 Subject: [PATCH] xfs: fix error bailout in xfs_rtginode_create Source kernel commit: 23bee6f390a12d0c4c51fefc083704bc5dac377e smatch reported that we screwed up the error cleanup in this function. Fix it. Cc: # v6.13-rc1 Fixes: ae897e0bed0f54 ("xfs: support creating per-RTG files in growfs") Reported-by: Dan Carpenter Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- libxfs/xfs_rtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libxfs/xfs_rtgroup.c b/libxfs/xfs_rtgroup.c index 8189b83d..aaaec2a1 100644 --- a/libxfs/xfs_rtgroup.c +++ b/libxfs/xfs_rtgroup.c @@ -493,7 +493,7 @@ xfs_rtginode_create( error = xfs_metadir_create(&upd, S_IFREG); if (error) - return error; + goto out_cancel; xfs_rtginode_lockdep_setup(upd.ip, rtg_rgno(rtg), type); -- 2.47.3