Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 1345

kernel-2.6.18-238.el5.src.rpm

From: Bob Peterson <rpeterso@redhat.com>
Date: Tue, 20 Jan 2009 13:11:20 -0500
Subject: [gfs2] mount attempt hangs if no more journals available
Message-id: 678737525.553181232475080378.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com
O-Subject: [PATCH][RHEL5.4] bz 475312 - GFS2: mount attempt hangs if no more journals available
Bugzilla: 475312
RH-Acked-by: Steven Whitehouse <swhiteho@redhat.com>

Hi,

When GFS2 fails to mount a file system (for example, if there aren't
enough journals) the mount would hang.  That's because GFS2's error
path was not releasing a resource it had acquired earlier.

This patch is now upstream, and it has been tested on RHEL5 system
roth-01 and found to be correct.

Regards,

Bob Peterson
Red Hat GFS

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
--

diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index a956c27..47a92bd 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1095,6 +1095,8 @@ fail_sb:
 		dput(sdp->sd_root_dir);
 	if (sdp->sd_master_dir)
 		dput(sdp->sd_master_dir);
+	if (sb->s_root)
+		dput(sb->s_root);
 	sb->s_root = NULL;
 fail_locking:
 	init_locking(sdp, &mount_gh, UNDO);