vfs: pass right create mode to may_o_create()
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 15 Aug 2012 11:01:24 +0000 (13:01 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 15 Aug 2012 11:01:24 +0000 (13:01 +0200)
Pass the umask-ed create mode to may_o_create() instead of the original one.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
fs/namei.c

index 5bac1bb6e585d6980672eadb3975898fdc873ba3..26c28ec4f4af92caf0e3b409309c4c69aa6122c4 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)