patch-2.3.99-pre1 linux/fs/super.c

Next file: linux/fs/sysv/inode.c
Previous file: linux/fs/smbfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.51/linux/fs/super.c linux/fs/super.c
@@ -966,10 +966,10 @@
 	sb->s_bdev = NULL;
 	sb->s_dev = 0;
 	sb->s_type = NULL;
-fsput_and_out:
-	put_filesystem(fs_type);
 	if (bdev)
 		bdput(bdev);
+fsput_and_out:
+	put_filesystem(fs_type);
 dput_and_out:
 	dput(dir_d);
 	up(&mount_sem);
@@ -1134,7 +1134,7 @@
 		dentry = namei(dev_name);
 		retval = PTR_ERR(dentry);
 		if (IS_ERR(dentry))
-			goto out;
+			goto fs_out;
 
 		inode = dentry->d_inode;
 		retval = -ENOTBLK;
@@ -1163,6 +1163,8 @@
 
 dput_and_out:
 	dput(dentry);
+fs_out:
+	put_filesystem(fstype);
 out:
 	unlock_kernel();
 	return retval;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)