summaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2020-12-19 10:54:51 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2021-02-03 18:37:25 +0100
commit76fce6548961a0c6246c4796e71800cdc63d5851 (patch)
tree8f48bb0935059439cf1f2b88431e8bc27c2300d7 /fs/gfs2
parent5cb738b5fbd2f3ebe9dec0e428577a4f2128adbe (diff)
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>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/log.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 6b5584fd8ff7..6fd4ded1e357 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -265,6 +265,23 @@ static void gfs2_log_update_head(struct gfs2_sbd *sdp)
}
/**
+ * 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
* @sdp: the filesystem
* @tr: the transaction
@@ -373,23 +390,6 @@ static void gfs2_ail1_wait(struct gfs2_sbd *sdp)
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)
{
gfs2_ail_empty_tr(sdp, tr, &tr->tr_ail2_list);