linux/drivers/block
Christoph Hellwig 2736e8eeb0 block: use the holder as indication for exclusive opens
The current interface for exclusive opens is rather confusing as it
requires both the FMODE_EXCL flag and a holder.  Remove the need to pass
FMODE_EXCL and just key off the exclusive open off a non-NULL holder.

For blkdev_put this requires adding the holder argument, which provides
better debug checking that only the holder actually releases the hold,
but at the same time allows removing the now superfluous mode argument.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Acked-by: David Sterba <dsterba@suse.com>		[btrfs]
Acked-by: Jack Wang <jinpu.wang@ionos.com>		[rnbd]
Link: https://lore.kernel.org/r/20230608110258.189493-16-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-06-12 08:04:04 -06:00
..
aoe block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
drbd block: use the holder as indication for exclusive opens 2023-06-12 08:04:04 -06:00
mtip32xx block: move from strlcpy with unused retval to strscpy 2022-09-21 19:45:04 -06:00
null_blk for-6.4/block-2023-05-06 2023-05-06 08:28:58 -07:00
rnbd block: use the holder as indication for exclusive opens 2023-06-12 08:04:04 -06:00
xen-blkback block: use the holder as indication for exclusive opens 2023-06-12 08:04:04 -06:00
zram block: use the holder as indication for exclusive opens 2023-06-12 08:04:04 -06:00
amiflop.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
ataflop.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
brd.c brd: use XArray instead of radix-tree to index backing pages 2023-05-16 09:03:23 -06:00
floppy.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
Kconfig block: ublk: switch to ioctl command encoding 2023-04-18 20:13:30 -06:00
loop.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
Makefile Revert "pktcdvd: remove driver." 2023-01-04 14:44:13 -07:00
n64cart.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
nbd.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
pktcdvd.c block: use the holder as indication for exclusive opens 2023-06-12 08:04:04 -06:00
ps3disk.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ps3vram.c ps3vram: remove bio splitting 2023-01-29 15:18:35 -07:00
rbd_types.h libceph, rbd: replace zero-length array with flexible-array 2020-06-01 13:22:53 +02:00
rbd.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
sunvdc.c block: sunvdc: add check for mdesc_grab() returning NULL 2023-03-15 08:48:58 -06:00
swim3.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
swim_asm.S
swim.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00
ublk_drv.c block: pass a gendisk to ->open 2023-06-12 08:04:04 -06:00
virtio_blk.c virtio-blk: fix ZBD probe in kernels without ZBD support 2023-04-04 11:01:57 -04:00
xen-blkfront.c xen: branch for v6.2-rc4 2023-01-12 17:02:20 -06:00
z2ram.c block: remove the unused mode argument to ->release 2023-06-12 08:04:04 -06:00