block: fix the exclusive open mask in disk_scan_partitions
authorChristoph Hellwig <hch@lst.de>
Wed, 21 Jun 2023 12:49:14 +0000 (14:49 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Jun 2023 13:37:52 +0000 (07:37 -0600)
commit56e71bdf324d6ab263eba1fc3fa1f3fd8bb5678e
tree248f2edc51ee7f3672689e59c54f73a46339672b
parentb6f3f28f604ba3de4724ad82bea6adb1300c0b5f
block: fix the exclusive open mask in disk_scan_partitions

FMODE_EXEC has nothing to do with exclusive opens, and even is of
the wrong type.  We need to check for BLK_OPEN_EXCL here.

Fixes: 985958b8584c ("block: fix wrong mode for blkdev_get_by_dev() from disk_scan_partitions()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230621124914.185992-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c