linux/drivers/s390
Christoph Hellwig c2b4bb8cb3 block: fix locking for struct block_device size updates
Two different callers use two different mutexes for updating the
block device size, which obviously doesn't help to actually protect
against concurrent updates from the different callers.  In addition
one of the locks, bd_mutex is rather prone to deadlocks with other
parts of the block stack that use it for high level synchronization.

Switch to using a new spinlock protecting just the size updates, as
that is all we need, and make sure everyone does the update through
the proper helper.

This fixes a bug reported with the nvme revalidating disks during a
hot removal operation, which can currently deadlock on bd_mutex.

Reported-by: Xianting Tian <xianting_tian@126.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-09-01 16:49:25 -06:00
..
block block: fix locking for struct block_device size updates 2020-09-01 16:49:25 -06:00
char s390/tty3270: remove function callback casts 2020-07-01 20:00:55 +02:00
cio s390/cio: add cond_resched() in the slow_eval_known_fn() loop 2020-08-17 13:17:00 +02:00
crypto s390/pkey: remove redundant variable initialization 2020-08-11 18:16:31 +02:00
net treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
scsi scsi: zfcp: Fix use-after-free in request timeout handlers 2020-08-17 22:12:09 -04:00
virtio s390/virtio: remove unused pm callbacks 2020-06-16 13:44:04 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00