mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
gfs2: Move function gfs2_ail_empty_tr
Move this function further up in log.c so that we can use it in the next patch. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
5cb738b5fb
commit
76fce65489
1 changed files with 17 additions and 17 deletions
|
@ -264,6 +264,23 @@ static void gfs2_log_update_head(struct gfs2_sbd *sdp)
|
||||||
sdp->sd_log_head = new_head;
|
sdp->sd_log_head = new_head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gfs2_ail_empty_tr - empty one of the ail lists of a transaction
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void gfs2_ail_empty_tr(struct gfs2_sbd *sdp, struct gfs2_trans *tr,
|
||||||
|
struct list_head *head)
|
||||||
|
{
|
||||||
|
struct gfs2_bufdata *bd;
|
||||||
|
|
||||||
|
while (!list_empty(head)) {
|
||||||
|
bd = list_first_entry(head, struct gfs2_bufdata,
|
||||||
|
bd_ail_st_list);
|
||||||
|
gfs2_assert(sdp, bd->bd_tr == tr);
|
||||||
|
gfs2_remove_from_ail(bd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gfs2_ail1_empty_one - Check whether or not a trans in the AIL has been synced
|
* gfs2_ail1_empty_one - Check whether or not a trans in the AIL has been synced
|
||||||
* @sdp: the filesystem
|
* @sdp: the filesystem
|
||||||
|
@ -373,23 +390,6 @@ static void gfs2_ail1_wait(struct gfs2_sbd *sdp)
|
||||||
spin_unlock(&sdp->sd_ail_lock);
|
spin_unlock(&sdp->sd_ail_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gfs2_ail_empty_tr - empty one of the ail lists for a transaction
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void gfs2_ail_empty_tr(struct gfs2_sbd *sdp, struct gfs2_trans *tr,
|
|
||||||
struct list_head *head)
|
|
||||||
{
|
|
||||||
struct gfs2_bufdata *bd;
|
|
||||||
|
|
||||||
while (!list_empty(head)) {
|
|
||||||
bd = list_first_entry(head, struct gfs2_bufdata,
|
|
||||||
bd_ail_st_list);
|
|
||||||
gfs2_assert(sdp, bd->bd_tr == tr);
|
|
||||||
gfs2_remove_from_ail(bd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __ail2_empty(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
|
static void __ail2_empty(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
|
||||||
{
|
{
|
||||||
gfs2_ail_empty_tr(sdp, tr, &tr->tr_ail2_list);
|
gfs2_ail_empty_tr(sdp, tr, &tr->tr_ail2_list);
|
||||||
|
|
Loading…
Reference in a new issue