aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/recovery.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-11-26 08:30:49 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2009-01-05 02:39:12 -0500
commit2bfb6449b7a1f29a2a63e1d869103b5811c3b69f (patch)
treee4f8f51cf7346ec239ebd0b9ac9ddc2580c706e2 /fs/gfs2/recovery.c
parentb52896813c2f16bcc5c5b67bb3c3f75bc084439b (diff)
GFS2: Move four functions from super.c
The functions which are being moved can all be marked static in their new locations, since they only have a single caller each. Their new locations are more logical than before and some of the functions are small enough that the compiler might well inline them. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r--fs/gfs2/recovery.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index b56ba3db7771..efd09c3d2b26 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -585,6 +585,28 @@ fail:
585 return error; 585 return error;
586} 586}
587 587
588static struct gfs2_jdesc *gfs2_jdesc_find_dirty(struct gfs2_sbd *sdp)
589{
590 struct gfs2_jdesc *jd;
591 int found = 0;
592
593 spin_lock(&sdp->sd_jindex_spin);
594
595 list_for_each_entry(jd, &sdp->sd_jindex_list, jd_list) {
596 if (jd->jd_dirty) {
597 jd->jd_dirty = 0;
598 found = 1;
599 break;
600 }
601 }
602 spin_unlock(&sdp->sd_jindex_spin);
603
604 if (!found)
605 jd = NULL;
606
607 return jd;
608}
609
588/** 610/**
589 * gfs2_check_journals - Recover any dirty journals 611 * gfs2_check_journals - Recover any dirty journals
590 * @sdp: the filesystem 612 * @sdp: the filesystem