diff options
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r-- | fs/gfs2/lops.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 08de8b7fb316..0ec38b399097 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -592,6 +592,17 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) | |||
592 | gfs2_log_lock(sdp); | 592 | gfs2_log_lock(sdp); |
593 | if (n++ > num) | 593 | if (n++ > num) |
594 | break; | 594 | break; |
595 | } else if (!bd1->bd_bh) { | ||
596 | total_dbuf--; | ||
597 | sdp->sd_log_num_databuf--; | ||
598 | list_del_init(&bd1->bd_le.le_list); | ||
599 | if (bd1 == bd2) { | ||
600 | bd2 = NULL; | ||
601 | bd2 = list_prepare_entry(bd2, | ||
602 | &sdp->sd_log_le_databuf, | ||
603 | bd_le.le_list); | ||
604 | } | ||
605 | kmem_cache_free(gfs2_bufdata_cachep, bd1); | ||
595 | } | 606 | } |
596 | } | 607 | } |
597 | gfs2_log_unlock(sdp); | 608 | gfs2_log_unlock(sdp); |