From: Darrick J. Wong Date: Mon, 2 Dec 2024 18:57:30 +0000 (-0800) Subject: xfs: fix error bailout in xfs_rtginode_create X-Git-Tag: v6.13-rc3~26^2^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23bee6f390a12d0c4c51fefc083704bc5dac377e;p=thirdparty%2Fkernel%2Flinux.git xfs: fix error bailout in xfs_rtginode_create 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 --- diff --git a/fs/xfs/libxfs/xfs_rtgroup.c b/fs/xfs/libxfs/xfs_rtgroup.c index e74bb059f24fa..4f3bfc884aff2 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);