vfs: pass right create mode to may_o_create()

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>
This commit is contained in:
Miklos Szeredi 2012-08-15 13:01:24 +02:00
parent 62b259d8b3
commit 38227f78a5

View 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)