mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 14:50:53 +07:00
xfs: undo block reservation correctly in xfs_trans_reserve()
"blocks" should be added back to fdblocks at undo time, not taken
away, i.e. the minus sign should not be used.
This is a regression introduced by commit 0d485ada40
("xfs: use
generic percpu counters for free block counter"). And it's found by
code inspection, I didn't it in real world, so there's no
reproducer.
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
ea78d80866
commit
a27f6ef4e6
@ -217,7 +217,7 @@ xfs_trans_reserve(
|
||||
|
||||
undo_blocks:
|
||||
if (blocks > 0) {
|
||||
xfs_mod_fdblocks(tp->t_mountp, -((int64_t)blocks), rsvd);
|
||||
xfs_mod_fdblocks(tp->t_mountp, (int64_t)blocks, rsvd);
|
||||
tp->t_blk_res = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user