dm-ioctl.c: deregister the misc device, and its associated symlink
*before* removing the /dev/mapper dir.  [Alasdair Kergon]
--- diff/drivers/md/dm-ioctl.c	2003-02-26 16:09:52.000000000 +0000
+++ source/drivers/md/dm-ioctl.c	2003-02-26 16:09:57.000000000 +0000
@@ -1123,17 +1123,17 @@
 	return 0;
 
       failed:
+	devfs_remove(DM_DIR "/control");
+	if (misc_deregister(&_dm_misc) < 0)
+		DMERR("misc_deregister failed for control device");
 	dm_hash_exit();
-	misc_deregister(&_dm_misc);
 	return r;
 }
 
 void dm_interface_exit(void)
 {
-	dm_hash_exit();
-
 	devfs_remove(DM_DIR "/control");
-
 	if (misc_deregister(&_dm_misc) < 0)
 		DMERR("misc_deregister failed for control device");
+	dm_hash_exit();
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/