| To: | linux-xfs@xxxxxxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfs: undo block reservation correctly in xfs_trans_reserve() |
| From: | Eryu Guan <guaneryu@xxxxxxxxx> |
| Date: | Tue, 6 Sep 2016 16:03:59 +0800 |
| Cc: | xfs@xxxxxxxxxxx, Eryu Guan <guaneryu@xxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=wnQcj8JRgwTUOvuvrPq6mRD+pFWfVL6vdOgFdIFsTCg=; b=twqU/cOXSArxv5QeyPTMj7YCQ9B/R+nDBy9QalB1FPVdNibrUyGsoqNNZ7zZ99v4k8 nyOYCxfN6926KIwrv3BBGvpA2dJaGMB0dEIgJ8imzpjNPdm3YSlMvpv489ohSGOXhFkB Hz7v5dP4og8PM83F2EkF4Vo5lVBzG9NTIgFgVfJr6nO1RI5vhRe1WzSa1EZqM9/NmSqQ JE5+i6ZcDokVQFil4ce2MN4uhUHdcClWGurgCKLnsJ7NyjXmgyil8ZPZg10ZjU66FxRA zkJUl1ie2AVRF9dIjw7zx5DKaQEZJw42ee78nsHfx3zeq+cEJrguDkH4mg0VSrLaOHMl eOgA== |
"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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Please add me to the xfstest mailing list, Elie Rozen |
|---|---|
| Next by Date: | [INFO] xfs: kernel debugging with trace_printk(), Dave Chinner |
| Previous by Thread: | Please add me to the xfstest mailing list, Elie Rozen |
| Next by Thread: | Re: [PATCH] xfs: undo block reservation correctly in xfs_trans_reserve(), Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |