Re: [PATCH 02/32] block: Use file->f_flags for determining exclusive opens in file_to_blk_mode()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 06, 2023 at 06:35:56PM +0200, Jan Kara wrote:
> > 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.
> 
> Aha, good point! So I need to workaround this a bit differently. I think
> the best would be to have file_to_blk_mode() for blkdev_open() only and
> make the other places (which already have bdev_handle available from
> struct file) use bdev_handle->mode.

Exactly.

> But I have to come up with a sane
> transition to that state :).

I think you can simply do it in the patch switching the block device
to be handle based.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux