Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76059
b: refs/heads/master
c: ac39aad
h: refs/heads/master
i:
  76057: ffc0b62
  76055: 7cc28de
v: v3
  • Loading branch information
Steven Whitehouse committed Jan 25, 2008
1 parent 55e4c24 commit 9706548
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9656b2c14c6ee0806c90a6be41dec71117fc8f50
refs/heads/master: ac39aadd0440ae696e6dacaa8006ce1737b17008
11 changes: 4 additions & 7 deletions trunk/fs/gfs2/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ void __gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl)
static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
{
unsigned int reserved;
unsigned int old;
unsigned int unused;

gfs2_log_lock(sdp);

Expand All @@ -769,14 +769,11 @@ 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);
old = atomic_read(&sdp->sd_log_blks_free);
atomic_add(tr->tr_reserved - (reserved - sdp->sd_log_blks_reserved),
&sdp->sd_log_blks_free);

gfs2_assert_withdraw(sdp, atomic_read(&sdp->sd_log_blks_free) >= old);
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);

sdp->sd_log_blks_reserved = reserved;

gfs2_log_unlock(sdp);
Expand Down

0 comments on commit 9706548

Please sign in to comment.