vfs: pass right create mode to may_o_create()
[platform/adaptation/renesas_rcar/renesas_kernel.git] / fs / namei.c
index 5bac1bb..26c28ec 100644 (file)
@@ -2452,7 +2452,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
        }
 
        if (open_flag & O_CREAT) {
-               error = may_o_create(&nd->path, dentry, op->mode);
+               error = may_o_create(&nd->path, dentry, mode);
                if (error) {
                        create_error = error;
                        if (open_flag & O_EXCL)