diff options
author | Christoph Hellwig <hch@lst.de> | 2021-05-25 08:12:56 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-01 07:44:32 -0600 |
commit | a8698707a1835be3abd12a3b28079a80999f8dee (patch) | |
tree | aa913e2f7ea74fc5514d052b8bb4c89734dc031b /drivers/scsi | |
parent | 210a6d756f20f33fc546ec8682a538fbcb84ee8e (diff) | |
download | linux-stable-a8698707a1835be3abd12a3b28079a80999f8dee.tar.gz linux-stable-a8698707a1835be3abd12a3b28079a80999f8dee.tar.bz2 linux-stable-a8698707a1835be3abd12a3b28079a80999f8dee.zip |
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index cb3c37d1e009..d3ff723af879 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1400,7 +1400,7 @@ static void sd_uninit_command(struct scsi_cmnd *SCpnt) * In the latter case @inode and @filp carry an abridged amount * of information as noted above. * - * Locking: called with bdev->bd_mutex held. + * Locking: called with bdev->bd_disk->open_mutex held. **/ static int sd_open(struct block_device *bdev, fmode_t mode) { @@ -1476,7 +1476,7 @@ error_out: * Note: may block (uninterruptible) if error recovery is underway * on this disk. * - * Locking: called with bdev->bd_mutex held. + * Locking: called with bdev->bd_disk->open_mutex held. **/ static void sd_release(struct gendisk *disk, fmode_t mode) { |