[PATCH] xfs: undo block reservation correctly in xfs_trans_reserve()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"blocks" should be added back to fdblocks at undo time, not taken
away, i.e. the minus sign should not be used.

Fixes: 0d485ada404b ("xfs: use generic percpu counters for free block counter")
Signed-off-by: Eryu Guan <guaneryu@xxxxxxxxx>
---
 fs/xfs/xfs_trans.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 5f3d33d..011dace 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -217,7 +217,7 @@ undo_log:
 
 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;
 	}
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux