From: Eryu Guan <guaneryu@gmail.com>
To: linux-xfs@vger.kernel.org
Cc: Eryu Guan <guaneryu@gmail.com>, xfs@oss.sgi.com
Subject: [PATCH] xfs: undo block reservation correctly in xfs_trans_reserve()
Date: Tue, 6 Sep 2016 16:03:59 +0800 [thread overview]
Message-ID: <1473149039-30487-1-git-send-email-guaneryu@gmail.com> (raw)
"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@gmail.com>
---
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2016-09-06 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 8:03 Eryu Guan [this message]
2016-09-06 8:48 ` [PATCH] xfs: undo block reservation correctly in xfs_trans_reserve() Dave Chinner
2016-09-06 11:50 ` Eryu Guan
2016-09-06 22:35 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473149039-30487-1-git-send-email-guaneryu@gmail.com \
--to=guaneryu@gmail.com \
--cc=linux-xfs@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.