aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index a591fb8fae20..af728cb3b327 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -509,7 +509,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl)
509 509
510static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) 510static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
511{ 511{
512 unsigned int reserved = 1; 512 unsigned int reserved = 0;
513 unsigned int old; 513 unsigned int old;
514 514
515 gfs2_log_lock(sdp); 515 gfs2_log_lock(sdp);
@@ -524,6 +524,8 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
524 if (sdp->sd_log_commited_revoke) 524 if (sdp->sd_log_commited_revoke)
525 reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, 525 reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke,
526 sizeof(uint64_t)); 526 sizeof(uint64_t));
527 if (reserved)
528 reserved++;
527 529
528 old = sdp->sd_log_blks_free; 530 old = sdp->sd_log_blks_free;
529 sdp->sd_log_blks_free += tr->tr_reserved - 531 sdp->sd_log_blks_free += tr->tr_reserved -