login
Header Space

 
 

[PATCH] gfs2: fix assertion in log_refund()

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <swhiteho@...>
Cc: <cluster-devel@...>, lkml <linux-kernel@...>
Date: Thursday, April 17, 2008 - 11:25 am

since unsigned, unused >= 0 is always true.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 161ab6f..211dc2d 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -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);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] gfs2: fix assertion in log_refund(), Roel Kluin, (Thu Apr 17, 11:25 am)
Re: [PATCH] gfs2: fix assertion in log_refund(), Steven Whitehouse, (Fri Apr 18, 12:42 pm)
speck-geostationary