Re: [PATCH] locks: fix TOCTOU race when granting write lease

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

 



On Mon, Aug 15, 2022 at 10:18:21AM +0300, Amir Goldstein wrote:
> > > +static inline void put_file_access(struct file *file)
> > > +{
> > > +     if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) {
> > > +             i_readcount_dec(file->f_inode);
> > > +     } else if (file->f_mode & FMODE_WRITER) {
> > > +             put_write_access(file->f_inode);
> > > +             __mnt_drop_write(file->f_path.mnt);
> > > +     }
> > > +}
> >
> > What's the point of having it in linux/fs.h instead of internal.h?
> 
> No reason. Overlooked.
> Do you need me to re-send or will you move it to internal.h yourself?

Resend, please...



[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