]> err.no Git - linux-2.6/commitdiff
[GFS2] fix assertion in log_refund()
authorRoel Kluin <12o3l@tiscali.nl>
Thu, 17 Apr 2008 15:25:37 +0000 (17:25 +0200)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 18 Apr 2008 07:36:09 +0000 (08:36 +0100)
since unsigned, unused >= 0 is always true.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/log.c

index b335304fc5d6dc7b7f9da0a8b71be489787137e2..548264b1836d59d39275180c4ed5a7343eacc2f3 100644 (file)
@@ -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);