Skip to content

Commit

Permalink
[GFS2] Initialize extent_list earlier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Jan 25, 2008
1 parent e5d9dc2 commit 0811a12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
1 change: 1 addition & 0 deletions fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0811a12

Please sign in to comment.