Re: [PATCH] open: make RESOLVE_CACHED correctly test for O_TMPFILE

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

 



On Sat, Aug 05, 2023 at 07:17:54PM +0200, Christian Brauner wrote:
> On Sun, 06 Aug 2023 02:11:58 +1000, Aleksa Sarai wrote:
> > O_TMPFILE is actually __O_TMPFILE|O_DIRECTORY. This means that the old
> > fast-path check for RESOLVE_CACHED would reject all users passing
> > O_DIRECTORY with -EAGAIN, when in fact the intended test was to check
> > for __O_TMPFILE.

And afaict, io_uring has the same problem in

static bool io_openat_force_async(struct io_open *open)
{
        /*
         * Don't bother trying for O_TRUNC, O_CREAT, or O_TMPFILE open,
         * it'll always -EAGAIN
         */
        return open->how.flags & (O_TRUNC | O_CREAT | O_TMPFILE);
}

always forcing O_DIRECTORY lookups to go async. So that needs another
fix.



[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