mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 08:01:12 +02:00
xfs: release alleged child inode on metapath unlink error
If xchk_metapath_ilock_parent_and_child() fails after xchk_iget()
succeeds, release the inode reference before returning.
Fixes: 0d2c636e48 ("xfs: repair metadata directory file path connectivity")
Cc: stable@vger.kernel.org # v6.13
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
5344402f2c
commit
48d2b8351b
|
|
@ -637,6 +637,8 @@ xrep_metapath_try_unlink(
|
|||
error = xchk_metapath_ilock_parent_and_child(mpath, ip);
|
||||
if (error) {
|
||||
xchk_trans_cancel(sc);
|
||||
if (ip)
|
||||
xchk_irele(sc, ip);
|
||||
return error;
|
||||
}
|
||||
xfs_trans_ijoin(sc->tp, mpath->dp, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user