Commit 0fe11f99 authored by Alexander Viro's avatar Alexander Viro Committed by James Bottomley

[PATCH] dasd.c

	* switched to private queues
	* set ->queue
parent 042e7783
...@@ -2178,10 +2178,10 @@ dasd_release(struct inode *inp, struct file *filp) ...@@ -2178,10 +2178,10 @@ dasd_release(struct inode *inp, struct file *filp)
struct struct
block_device_operations dasd_device_operations = { block_device_operations dasd_device_operations = {
owner:THIS_MODULE, .owner = THIS_MODULE,
open:dasd_open, .open = dasd_open,
release:dasd_release, .release = dasd_release,
ioctl:dasd_ioctl, .ioctl = dasd_ioctl,
}; };
......
...@@ -35,26 +35,6 @@ struct major_info { ...@@ -35,26 +35,6 @@ struct major_info {
int major; int major;
}; };
/*
* Returns the queue corresponding to a device behind a kdev.
*/
static request_queue_t *
dasd_get_queue(kdev_t kdev)
{
dasd_devmap_t *devmap;
dasd_device_t *device;
request_queue_t *queue;
devmap = dasd_devmap_from_kdev(kdev);
device = (devmap != NULL) ?
dasd_get_device(devmap) : ERR_PTR(-ENODEV);
if (IS_ERR(device))
return NULL;
queue = device->request_queue;
dasd_put_device(devmap);
return queue;
}
/* /*
* Register major number for the dasd driver. Call with DASD_MAJOR to * Register major number for the dasd driver. Call with DASD_MAJOR to
* setup the static dasd device major 94 or with 0 to allocated a major * setup the static dasd device major 94 or with 0 to allocated a major
...@@ -93,8 +73,6 @@ dasd_register_major(int major) ...@@ -93,8 +73,6 @@ dasd_register_major(int major)
mi->major = new_major; mi->major = new_major;
/* Setup block device pointers for the new major. */ /* Setup block device pointers for the new major. */
blk_dev[new_major].queue = dasd_get_queue;
/* Insert the new major info structure into dasd_major_info list. */ /* Insert the new major info structure into dasd_major_info list. */
spin_lock(&dasd_major_lock); spin_lock(&dasd_major_lock);
list_add_tail(&mi->list, &dasd_major_info); list_add_tail(&mi->list, &dasd_major_info);
...@@ -116,9 +94,6 @@ dasd_unregister_major(struct major_info * mi) ...@@ -116,9 +94,6 @@ dasd_unregister_major(struct major_info * mi)
list_del(&mi->list); list_del(&mi->list);
spin_unlock(&dasd_major_lock); spin_unlock(&dasd_major_lock);
/* Clear block device pointers. */
blk_dev[mi->major].queue = NULL;
rc = unregister_blkdev(mi->major, "dasd"); rc = unregister_blkdev(mi->major, "dasd");
if (rc < 0) if (rc < 0)
MESSAGE(KERN_WARNING, MESSAGE(KERN_WARNING,
...@@ -273,6 +248,7 @@ dasd_setup_partitions(dasd_device_t * device) ...@@ -273,6 +248,7 @@ dasd_setup_partitions(dasd_device_t * device)
{ {
/* Make the disk known. */ /* Make the disk known. */
set_capacity(device->gdp, device->blocks << device->s2b_shift); set_capacity(device->gdp, device->blocks << device->s2b_shift);
device->gdp->queue = device->request_queue;
add_disk(device->gdp); add_disk(device->gdp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment