xfs: fix incorrect error-out in xfs_remove
PATCH 1/1 xfs: fix incorrect error-out in xfs_remove
From: Darrick J. Wong <[email protected]>
Clean up resources if resetting the dotdot entry doesn't succeed. Observed through code inspection.
Fixes 5838d0356bb3 ("xfs: reset child dir '..' entry when unlinking child")
Signed-off-by Darrick J. Wong <[email protected]>
--- fs/xfs/xfs_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_inode.c +1 -1
@@ -2479,7 +2479,7 @@ xfs_remove( error =xfs_dir_replace (tp, ip, &xfs_name_dotdot, tp->t_mountp->m_sb.sb_rootino,0 );if (error) -return error; + goto out_trans_cancel; } }else {/*
Quoted 17 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Clean up resources if resetting the dotdot entry doesn't succeed. Observed through code inspection.
Fixes 5838d0356bb3 ("xfs: reset child dir '..' entry when unlinking child")Signed-off-by Darrick J. Wong <[email protected]>--- fs/xfs/xfs_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_inode.c +0
-0
fs/xfs/xfs_inode.c xfs_remove( · line 2485
Quoted 8 lines
fs/xfs/xfs_inode.c +1
-1@@ -2479,7 +2479,7 @@ xfs_remove( error =xfs_dir_replace (tp, ip, &xfs_name_dotdot, tp->t_mountp->m_sb.sb_rootino,0 );if (error) -return error; + goto out_trans_cancel; } }else {/*
Looks good to me.
Reviewed-by Andrey Albershteyn <[email protected]>
Signature · 1 line
- Andrey