mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 07:31:45 +00:00
xfs: fix xfs_ifree() error handling to not leak perag ref
For some reason commit9a5280b312
("xfs: reorder iunlink remove operation in xfs_ifree") replaced a jump to the exit path in the event of an xfs_difree() error with a direct return, which skips releasing the perag reference acquired at the top of the function. Restore the original code to drop the reference on error. Fixes:9a5280b312
("xfs: reorder iunlink remove operation in xfs_ifree") Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
a54f78def7
commit
6f5097e336
@ -2622,7 +2622,7 @@ xfs_ifree(
|
||||
*/
|
||||
error = xfs_difree(tp, pag, ip->i_ino, &xic);
|
||||
if (error)
|
||||
return error;
|
||||
goto out;
|
||||
|
||||
error = xfs_iunlink_remove(tp, pag, ip);
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user