]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[GFS2] Initialize extent_list earlier
authorBob Peterson <rpeterso@redhat.com>
Thu, 3 Jan 2008 15:24:53 +0000 (09:24 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 25 Jan 2008 08:17:04 +0000 (08:17 +0000)
Here is a patch for the latest upstream GFS2 code:
The journal extent map needs to be initialized sooner than it
currently is.  Otherwise failed mount attempts (e.g. not enough
journals, etc.) may panic trying to access the uninitialized list.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/ops_fstype.c
fs/gfs2/super.c

index 5537798af381937f96d00e96f16e34e5f221427d..43d511bba52d3a11a388e011c12b8de9a34890d1 100644 (file)
@@ -329,7 +329,6 @@ static int map_journal_extents(struct gfs2_sbd *sdp)
        struct buffer_head bh;
        int rc = 0;
 
-       INIT_LIST_HEAD(&jd->extent_list);
        prev_db = 0;
 
        for (lb = 0; lb < ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; lb++) {
index 5d0017d313a35f24d18c05baa99d4926d55f0717..ef0562c3bc71986705dab6c7593f0f29c9908da4 100644 (file)
@@ -387,6 +387,7 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh)
                if (!jd)
                        break;
 
+               INIT_LIST_HEAD(&jd->extent_list);
                jd->jd_inode = gfs2_lookupi(sdp->sd_jindex, &name, 1, NULL);
                if (!jd->jd_inode || IS_ERR(jd->jd_inode)) {
                        if (!jd->jd_inode)