Commit 62b259d8 authored by Miklos Szeredi's avatar Miklos Szeredi

vfs: atomic_open(): fix create mode usage

Don't mask S_ISREG off the create mode before passing to ->atomic_open().  Other
methods (->create, ->mknod) also get the complete file mode and filesystems
expect it.
Reported-by: default avatarSteve <steveamigauk@yahoo.co.uk>
Reported-by: default avatarRichard W.M. Jones <rjones@redhat.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
parent e68726ff
......@@ -2414,7 +2414,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
goto out;
}
mode = op->mode & S_IALLUGO;
mode = op->mode;
if ((open_flag & O_CREAT) && !IS_POSIXACL(dir))
mode &= ~current_umask();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment