]> git.ipfire.org Git - people/ms/linux.git/commit - block/bdev.c
block: move bd_mutex to struct gendisk
authorChristoph Hellwig <hch@lst.de>
Tue, 25 May 2021 06:12:56 +0000 (08:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Jun 2021 13:44:32 +0000 (07:44 -0600)
commita8698707a1835be3abd12a3b28079a80999f8dee
treeaa913e2f7ea74fc5514d052b8bb4c89734dc031b
parent210a6d756f20f33fc546ec8682a538fbcb84ee8e
block: move bd_mutex to struct gendisk

Replace the per-block device bd_mutex with a per-gendisk open_mutex,
thus simplifying locking wherever we deal with partitions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Link: https://lore.kernel.org/r/20210525061301.2242282-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
15 files changed:
Documentation/filesystems/locking.rst
block/genhd.c
block/partitions/core.c
drivers/block/loop.c
drivers/block/xen-blkfront.c
drivers/block/zram/zram_drv.c
drivers/block/zram/zram_drv.h
drivers/md/md.h
drivers/s390/block/dasd_genhd.c
drivers/scsi/sd.c
fs/block_dev.c
fs/btrfs/volumes.c
fs/super.c
include/linux/blk_types.h
include/linux/genhd.h