diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2014-10-14 19:52:29 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-10-14 19:54:57 -0400 |
| commit | 1f54b0c055b9322f4e7acb49c492edc5accd15ae (patch) | |
| tree | 245f2f320e0da3c645bc5f21d0cccc7e2ae6432a /drivers/block | |
| parent | cc74f71934da13fa979669467c04f0d2e5563112 (diff) | |
virtio-blk: drop config_mutex
config_mutex served two purposes: prevent multiple concurrent config
change handlers, and synchronize access to config_enable flag.
Since commit dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1
workqueue: make all workqueues non-reentrant
all workqueues are non-reentrant, and config_enable
is now gone.
Get rid of the unnecessary lock.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/block')
| -rw-r--r-- | drivers/block/virtio_blk.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 91272f1a7dad..89ba8d6baa94 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
| @@ -41,9 +41,6 @@ struct virtio_blk | |||
| 41 | /* Process context for config space updates */ | 41 | /* Process context for config space updates */ |
| 42 | struct work_struct config_work; | 42 | struct work_struct config_work; |
| 43 | 43 | ||
| 44 | /* Lock for config space updates */ | ||
| 45 | struct mutex config_lock; | ||
| 46 | |||
| 47 | /* What host tells us, plus 2 for header & tailer. */ | 44 | /* What host tells us, plus 2 for header & tailer. */ |
| 48 | unsigned int sg_elems; | 45 | unsigned int sg_elems; |
| 49 | 46 | ||
| @@ -344,8 +341,6 @@ static void virtblk_config_changed_work(struct work_struct *work) | |||
| 344 | char *envp[] = { "RESIZE=1", NULL }; | 341 | char *envp[] = { "RESIZE=1", NULL }; |
| 345 | u64 capacity, size; | 342 | u64 capacity, size; |
| 346 | 343 | ||
| 347 | mutex_lock(&vblk->config_lock); | ||
| 348 | |||
| 349 | /* Host must always specify the capacity. */ | 344 | /* Host must always specify the capacity. */ |
| 350 | virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); | 345 | virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); |
| 351 | 346 | ||
| @@ -369,8 +364,6 @@ static void virtblk_config_changed_work(struct work_struct *work) | |||
| 369 | set_capacity(vblk->disk, capacity); | 364 | set_capacity(vblk->disk, capacity); |
| 370 | revalidate_disk(vblk->disk); | 365 | revalidate_disk(vblk->disk); |
| 371 | kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); | 366 | kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); |
| 372 | |||
| 373 | mutex_unlock(&vblk->config_lock); | ||
| 374 | } | 367 | } |
| 375 | 368 | ||
| 376 | static void virtblk_config_changed(struct virtio_device *vdev) | 369 | static void virtblk_config_changed(struct virtio_device *vdev) |
| @@ -601,7 +594,6 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
| 601 | 594 | ||
| 602 | vblk->vdev = vdev; | 595 | vblk->vdev = vdev; |
| 603 | vblk->sg_elems = sg_elems; | 596 | vblk->sg_elems = sg_elems; |
| 604 | mutex_init(&vblk->config_lock); | ||
| 605 | 597 | ||
| 606 | INIT_WORK(&vblk->config_work, virtblk_config_changed_work); | 598 | INIT_WORK(&vblk->config_work, virtblk_config_changed_work); |
| 607 | 599 | ||
