diff --git a/fs/namei.c b/fs/namei.c index 55a131230f94828eea51f54a56efe36a7ca0a9e4..863166441bf33d9d8a4d8c36340179134f513740 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1767,6 +1767,8 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir) if (nd->last_type != LAST_NORM) goto fail; nd->flags &= ~LOOKUP_PARENT; + nd->flags |= LOOKUP_CREATE; + nd->intent.open.flags = O_EXCL; /* * Do the final lookup.