Re: [PATCH 2/2] fs: require FMODE_WRITE for F_SET_RW_HINT

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

 



On Fri, Nov 22, 2024 at 05:15:47PM +0100, Christoph Hellwig wrote:
> On Fri, Nov 22, 2024 at 01:53:42PM +0100, Jan Kara wrote:
> > Here I'm not so sure. Firstly, since you are an owner this doesn't add any
> > additional practical restriction. Secondly, you are not changing anything
> > on disk, just IO hints in memory... Thirdly, we generally don't require
> > writeable fd even to do file attribute changes (like with fchmod, fchown,
> > etc.).  So although the check makes some sense, it seems to be mostly
> > inconsistent with how we treat similar stuff.
> 
> As I said I'm not quite convince either, so just doing the first one
> is probably fine.

We do require FMODE_WRITE to do a dedupe, which isn't exactly the same
but is similar in concept (we're not changing the content of the file;
we're changing how it's laid out on storage).  So I think it's reasonable
to require FMODE_WRITE to set the write hints.




[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