diff options
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r-- | fs/gfs2/log.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 13c6237c5f67..e5bf4b59d46e 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -417,7 +417,7 @@ static unsigned int calc_reserved(struct gfs2_sbd *sdp) | |||
417 | databufhdrs_needed = (sdp->sd_log_commited_databuf + | 417 | databufhdrs_needed = (sdp->sd_log_commited_databuf + |
418 | (dbuf_limit - 1)) / dbuf_limit; | 418 | (dbuf_limit - 1)) / dbuf_limit; |
419 | 419 | ||
420 | if (sdp->sd_log_commited_revoke) | 420 | if (sdp->sd_log_commited_revoke > 0) |
421 | revokes = gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, | 421 | revokes = gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, |
422 | sizeof(u64)); | 422 | sizeof(u64)); |
423 | 423 | ||
@@ -596,7 +596,9 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull) | |||
596 | memset(lh, 0, sizeof(struct gfs2_log_header)); | 596 | memset(lh, 0, sizeof(struct gfs2_log_header)); |
597 | lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC); | 597 | lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC); |
598 | lh->lh_header.mh_type = cpu_to_be32(GFS2_METATYPE_LH); | 598 | lh->lh_header.mh_type = cpu_to_be32(GFS2_METATYPE_LH); |
599 | lh->lh_header.__pad0 = cpu_to_be64(0); | ||
599 | lh->lh_header.mh_format = cpu_to_be32(GFS2_FORMAT_LH); | 600 | lh->lh_header.mh_format = cpu_to_be32(GFS2_FORMAT_LH); |
601 | lh->lh_header.mh_jid = cpu_to_be32(sdp->sd_jdesc->jd_jid); | ||
600 | lh->lh_sequence = cpu_to_be64(sdp->sd_log_sequence++); | 602 | lh->lh_sequence = cpu_to_be64(sdp->sd_log_sequence++); |
601 | lh->lh_flags = cpu_to_be32(flags); | 603 | lh->lh_flags = cpu_to_be32(flags); |
602 | lh->lh_tail = cpu_to_be32(tail); | 604 | lh->lh_tail = cpu_to_be32(tail); |
@@ -788,7 +790,6 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) | |||
788 | gfs2_assert_withdraw(sdp, (((int)sdp->sd_log_commited_buf) >= 0) || | 790 | gfs2_assert_withdraw(sdp, (((int)sdp->sd_log_commited_buf) >= 0) || |
789 | (((int)sdp->sd_log_commited_databuf) >= 0)); | 791 | (((int)sdp->sd_log_commited_databuf) >= 0)); |
790 | sdp->sd_log_commited_revoke += tr->tr_num_revoke - tr->tr_num_revoke_rm; | 792 | sdp->sd_log_commited_revoke += tr->tr_num_revoke - tr->tr_num_revoke_rm; |
791 | gfs2_assert_withdraw(sdp, ((int)sdp->sd_log_commited_revoke) >= 0); | ||
792 | reserved = calc_reserved(sdp); | 793 | reserved = calc_reserved(sdp); |
793 | gfs2_assert_withdraw(sdp, sdp->sd_log_blks_reserved + tr->tr_reserved >= reserved); | 794 | gfs2_assert_withdraw(sdp, sdp->sd_log_blks_reserved + tr->tr_reserved >= reserved); |
794 | unused = sdp->sd_log_blks_reserved - reserved + tr->tr_reserved; | 795 | unused = sdp->sd_log_blks_reserved - reserved + tr->tr_reserved; |