On Tue, Jul 04, 2023 at 02:21:29PM +0200, Jan Kara wrote: > Use file->f_flags instead of file->private_data for determining whether > we should set BLK_OPEN_EXCL flag. This allows us to remove somewhat > awkward setting of file->private_data before calling file_to_blk_mode() > and it also makes following conversion to blkdev_get_handle_by_dev() > simpler. While this looks a lot nicer, I don't think it actually works given that do_dentry_open clears out O_EXCL, and thus it won't be set when calling into blkdev_ioctl.