summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-01-20 17:39:23 +0100
committerSteven Whitehouse <steve@dolmen.chygwyn.com>2009-03-24 12:21:17 +0100
commite7c8707ea2b9106f0f78c43348ff5d5e82ba7961 (patch)
tree0e2de02adb03b9adccc1e8997782cc8c7561d8e8 /fs
parentGFS2: Remove unused field from glock (diff)
downloadlinux-e7c8707ea2b9106f0f78c43348ff5d5e82ba7961.tar.xz
linux-e7c8707ea2b9106f0f78c43348ff5d5e82ba7961.zip
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. Reported-by: Nate Straz <nstraz@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Tested-by: Robert Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_fstype.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 95bb33e41a76..e502b379a4da 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -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);