summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-12-02 10:57:30 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-12-12 17:45:10 -0800
commit23bee6f390a12d0c4c51fefc083704bc5dac377e (patch)
tree035878dc4ce24fa8a3ef14e1473608efa010e417 /fs/xfs
parentaf9f02457f461b23307fe826a37be61ba6e32c92 (diff)
downloadlinux-stable-23bee6f390a12d0c4c51fefc083704bc5dac377e.tar.gz
linux-stable-23bee6f390a12d0c4c51fefc083704bc5dac377e.tar.bz2
linux-stable-23bee6f390a12d0c4c51fefc083704bc5dac377e.zip
xfs: fix error bailout in xfs_rtginode_create
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/libxfs/xfs_rtgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_rtgroup.c b/fs/xfs/libxfs/xfs_rtgroup.c
index e74bb059f24f..4f3bfc884aff 100644
--- a/fs/xfs/libxfs/xfs_rtgroup.c
+++ b/fs/xfs/libxfs/xfs_rtgroup.c
@@ -496,7 +496,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);