]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: fix error bailout in xfs_rtginode_create
authorDarrick J. Wong <djwong@kernel.org>
Mon, 16 Dec 2024 02:18:42 +0000 (18:18 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:32 +0000 (18:01 -0800)
Source kernel commit: 23bee6f390a12d0c4c51fefc083704bc5dac377e

smatch reported that we screwed up the error cleanup in this function.
Fix it.

Cc: <stable@vger.kernel.org> # v6.13-rc1
Fixes: ae897e0bed0f54 ("xfs: support creating per-RTG files in growfs")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_rtgroup.c

index 8189b83d0f184a01092757982efa8b8124990d6c..aaaec2a1cef9e51c3649341f4d62e91f3d650518 100644 (file)
@@ -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);