Commit 2653d533 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: fix incorrect error-out in xfs_remove

Clean up resources if resetting the dotdot entry doesn't succeed.
Observed through code inspection.

Fixes: 5838d035 ("xfs: reset child dir '..' entry when unlinking child")
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarAndrey Albershteyn <aalbersh@redhat.com>
parent 7b082b5e
...@@ -2479,7 +2479,7 @@ xfs_remove( ...@@ -2479,7 +2479,7 @@ xfs_remove(
error = xfs_dir_replace(tp, ip, &xfs_name_dotdot, error = xfs_dir_replace(tp, ip, &xfs_name_dotdot,
tp->t_mountp->m_sb.sb_rootino, 0); tp->t_mountp->m_sb.sb_rootino, 0);
if (error) if (error)
return error; goto out_trans_cancel;
} }
} else { } else {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment