Skip to contentSkip to conversation

GFS2: Fix error path ref counting for root inode

Cluster-devel Steven Whitehouse 1 participant 1 message Jan 20, 2009 GFS2 file system

lore
Share & tools
lore
#0 lore raw

From 11a89c63956b880200d988eff59f355acfc4d545 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
Date: Tue, 20 Jan 2009 16:39:23 +0000
Subject: [PATCH] GFS2: Fix error path ref counting for root inode

We were keeping hold of an extra ref to the root inode in one of the error paths, that resulted in a hang.

fs/gfs2/ops_fstype.c +2 -0
index 95bb33e..e502b37 100644
@@ -1258,6 +1258,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);
Signature · 1 line
1.6.0.3