Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();