 +	printk(KERN_INFO "gnbd: registered device at major %d\n", major_nr);
 +	dprintk(DBG_INIT, "gnbd: debugflags=0x%x\n", debugflags);
 +
-+	devfs_mk_dir("gnbd");
++	devfs_mk_dir("gnbd_minor");
 +	err = class_register(&gnbd_class);
 +	if (err)
 +		goto out_unregister;

+		gnbd_dev[i].flags = 0;
+		gnbd_dev[i].open_count = 0;
+		gnbd_dev[i].receiver_pid = -1;
+		gnbd_dev[i].server_addr.s_addr = 0;
+		gnbd_dev[i].server_port = 0;
+		gnbd_dev[i].name[0] = '\0';
+		gnbd_dev[i].bdev = NULL;

+			blk_cleanup_queue(disk->queue);
+			put_disk(disk);
+		}
+		if (gnbd_dev[i].server_name)
+			kfree(gnbd_dev[i].server_name);
+	}
+	class_unregister(&gnbd_class);
+	devfs_remove("gnbd");
