Christian Brauner 190f676afa
block/genhd: port disk_scan_partitions() to file
This may run from a kernel thread via device_add_disk(). So this could
also use __fput_sync() if we were worried about EBUSY. But when it is
called from a kernel thread it's always BLK_OPEN_READ so EBUSY can't
really happen even if we do BLK_OPEN_RESTRICT_WRITES or BLK_OPEN_EXCL.

Otherwise it's called from an ioctl on the block device which is only
called from userspace and can rely on task work.

Link: https://lore.kernel.org/r/20240123-vfs-bdev-file-v2-3-adbd023e19cc@kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-02-25 12:05:22 +01:00
..
2024-02-25 12:05:21 +01:00
2023-06-30 11:57:07 -07:00
2024-01-11 13:58:04 -08:00
2023-09-22 08:52:13 -06:00
2023-06-26 12:47:20 -07:00
2024-01-18 18:22:40 -08:00
2024-01-11 13:58:04 -08:00
2023-12-19 20:17:43 -07:00
2023-06-30 11:57:07 -07:00
2023-11-01 12:30:07 -10:00
2022-03-07 12:48:35 -07:00