diff options
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r-- | fs/gfs2/lops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 3e971f25120d..df6bceea379a 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -607,7 +607,8 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) | |||
607 | if (unlikely(magic != 0)) | 607 | if (unlikely(magic != 0)) |
608 | set_buffer_escaped(bh1); | 608 | set_buffer_escaped(bh1); |
609 | gfs2_log_lock(sdp); | 609 | gfs2_log_lock(sdp); |
610 | if (n++ > num) | 610 | n += 2; |
611 | if (n >= num) | ||
611 | break; | 612 | break; |
612 | } else if (!bh1) { | 613 | } else if (!bh1) { |
613 | total_dbuf--; | 614 | total_dbuf--; |
@@ -624,6 +625,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) | |||
624 | } | 625 | } |
625 | gfs2_log_unlock(sdp); | 626 | gfs2_log_unlock(sdp); |
626 | if (bh) { | 627 | if (bh) { |
628 | set_buffer_mapped(bh); | ||
627 | set_buffer_dirty(bh); | 629 | set_buffer_dirty(bh); |
628 | ll_rw_block(WRITE, 1, &bh); | 630 | ll_rw_block(WRITE, 1, &bh); |
629 | bh = NULL; | 631 | bh = NULL; |