Skip to content

Commit

Permalink
[GFS2] fix assertion in log_refund()
Browse files Browse the repository at this point in the history
since unsigned, unused >= 0 is always true.

Signed-off-by: Roel Kluin <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
  • Loading branch information
Roel Kluin authored and swhiteho committed Apr 18, 2008
1 parent 16c5f06 commit 62be1f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
sdp->sd_log_commited_revoke += tr->tr_num_revoke - tr->tr_num_revoke_rm;
gfs2_assert_withdraw(sdp, ((int)sdp->sd_log_commited_revoke) >= 0);
reserved = calc_reserved(sdp);
gfs2_assert_withdraw(sdp, sdp->sd_log_blks_reserved + tr->tr_reserved >= reserved);
unused = sdp->sd_log_blks_reserved - reserved + tr->tr_reserved;
gfs2_assert_withdraw(sdp, unused >= 0);
atomic_add(unused, &sdp->sd_log_blks_free);
gfs2_assert_withdraw(sdp, atomic_read(&sdp->sd_log_blks_free) <=
sdp->sd_jdesc->jd_blocks);
Expand Down

0 comments on commit 62be1f7

Please sign in to comment.