Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0811a127 authored by Bob Peterson's avatar Bob Peterson Committed by Steven Whitehouse
Browse files

[GFS2] Initialize extent_list earlier



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: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent e5d9dc27
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -329,7 +329,6 @@ static int map_journal_extents(struct gfs2_sbd *sdp)
	struct buffer_head bh;
	struct buffer_head bh;
	int rc = 0;
	int rc = 0;


	INIT_LIST_HEAD(&jd->extent_list);
	prev_db = 0;
	prev_db = 0;


	for (lb = 0; lb < ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; lb++) {
	for (lb = 0; lb < ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; lb++) {
+1 −0
Original line number Original line Diff line number Diff line
@@ -387,6 +387,7 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh)
		if (!jd)
		if (!jd)
			break;
			break;


		INIT_LIST_HEAD(&jd->extent_list);
		jd->jd_inode = gfs2_lookupi(sdp->sd_jindex, &name, 1, NULL);
		jd->jd_inode = gfs2_lookupi(sdp->sd_jindex, &name, 1, NULL);
		if (!jd->jd_inode || IS_ERR(jd->jd_inode)) {
		if (!jd->jd_inode || IS_ERR(jd->jd_inode)) {
			if (!jd->jd_inode)
			if (!jd->jd_inode)