open: make RESOLVE_CACHED correctly test for O_TMPFILE
[linux-2.6-block.git] / fs / open.c
index 0c55c8e7f837d8ef03ab19b5645b40401205ee42..e6ead0f19964957afd601cb4f7ad1ab88a9a510c 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -1322,7 +1322,7 @@ inline int build_open_flags(const struct open_how *how, struct open_flags *op)
                lookup_flags |= LOOKUP_IN_ROOT;
        if (how->resolve & RESOLVE_CACHED) {
                /* Don't bother even trying for create/truncate/tmpfile open */
-               if (flags & (O_TRUNC | O_CREAT | O_TMPFILE))
+               if (flags & (O_TRUNC | O_CREAT | __O_TMPFILE))
                        return -EAGAIN;
                lookup_flags |= LOOKUP_CACHED;
        }