riscv: Kconfig: Add select ARM_AMBA to SOC_STARFIVE
[platform/kernel/linux-starfive.git] / io_uring / openclose.c
index 67178e4..008990e 100644 (file)
@@ -110,9 +110,11 @@ int io_openat2(struct io_kiocb *req, unsigned int issue_flags)
        if (issue_flags & IO_URING_F_NONBLOCK) {
                /*
                 * Don't bother trying for O_TRUNC, O_CREAT, or O_TMPFILE open,
-                * it'll always -EAGAIN
+                * it'll always -EAGAIN. Note that we test for __O_TMPFILE
+                * because O_TMPFILE includes O_DIRECTORY, which isn't a flag
+                * we need to force async for.
                 */
-               if (open->how.flags & (O_TRUNC | O_CREAT | O_TMPFILE))
+               if (open->how.flags & (O_TRUNC | O_CREAT | __O_TMPFILE))
                        return -EAGAIN;
                op.lookup_flags |= LOOKUP_CACHED;
                op.open_flag |= O_NONBLOCK;