LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] gfs2: fix assertion in log_refund()
@ 2008-04-17 15:25 Roel Kluin
2008-04-18 16:42 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-04-17 15:25 UTC (permalink / raw)
To: swhiteho; +Cc: cluster-devel, lkml
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gfs2: fix assertion in log_refund()
2008-04-17 15:25 [PATCH] gfs2: fix assertion in log_refund() Roel Kluin
@ 2008-04-18 16:42 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2008-04-18 16:42 UTC (permalink / raw)
To: Roel Kluin; +Cc: cluster-devel, lkml
Hi,
Now in the GFS2 -nmw git tree, which I'm just about to send a pull
request for,
Steve.
On Thu, 2008-04-17 at 17:25 +0200, Roel Kluin wrote:
> 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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-18 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-17 15:25 [PATCH] gfs2: fix assertion in log_refund() Roel Kluin
2008-04-18 16:42 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).