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

Commit e7c8707e authored by Steven Whitehouse's avatar Steven Whitehouse Committed by Steven Whitehouse
Browse files

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: default avatarNate Straz <nstraz@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
Tested-by: default avatarRobert Peterson <rpeterso@redhat.com>
parent ac2425e7
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1258,6 +1258,8 @@ static int fill_super(struct super_block *sb, void *data, int silent)
		dput(sdp->sd_root_dir);
		dput(sdp->sd_root_dir);
	if (sdp->sd_master_dir)
	if (sdp->sd_master_dir)
		dput(sdp->sd_master_dir);
		dput(sdp->sd_master_dir);
	if (sb->s_root)
		dput(sb->s_root);
	sb->s_root = NULL;
	sb->s_root = NULL;
fail_locking:
fail_locking:
	init_locking(sdp, &mount_gh, UNDO);
	init_locking(sdp, &mount_gh, UNDO);