Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58593
b: refs/heads/master
c: a0a2474
h: refs/heads/master
i:
  58591: 0e5f7a5
v: v3
  • Loading branch information
Steven Whitehouse committed Jul 9, 2007
1 parent 70ed442 commit d8794b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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: ac90a2552500996c529d5f0ddc16a9bf60bf670d
refs/heads/master: a0a24741cac414aba5918e9939afafa70c37f952
19 changes: 14 additions & 5 deletions trunk/fs/gfs2/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,7 @@ static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
list_del(&bd->bd_ail_st_list);
list_del(&bd->bd_ail_gl_list);
atomic_dec(&bd->bd_gl->gl_ail_count);
if (bd->bd_bh)
brelse(bd->bd_bh);
else
kmem_cache_free(gfs2_bufdata_cachep, bd);
brelse(bd->bd_bh);
}
}

Expand Down Expand Up @@ -583,6 +580,7 @@ static void log_flush_commit(struct gfs2_sbd *sdp)
struct list_head *head = &sdp->sd_log_flush_list;
struct gfs2_log_buf *lb;
struct buffer_head *bh;
int flushcount = 0;

while (!list_empty(head)) {
lb = list_entry(head->next, struct gfs2_log_buf, lb_list);
Expand All @@ -599,9 +597,20 @@ static void log_flush_commit(struct gfs2_sbd *sdp)
} else
brelse(bh);
kfree(lb);
flushcount++;
}

log_write_header(sdp, 0, 0);
/* If nothing was journaled, the header is unplanned and unwanted. */
if (flushcount) {
log_write_header(sdp, 0, 0);
} else {
unsigned int tail;
tail = current_tail(sdp);

gfs2_ail1_empty(sdp, 0);
if (sdp->sd_log_tail != tail)
log_pull_tail(sdp, tail);
}
}

/**
Expand Down

0 comments on commit d8794b0

Please sign in to comment.