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

Commit a718c922 authored by Richard Weinberger's avatar Richard Weinberger
Browse files

hostfs: Use correct mask for file mode



S_IFMT is obviously wrong and needs to be 0777.
We're interested in the file mode, not the type.

Fixes: b98b9102 (hostfs: No need to box and later unbox the file mode)
Reported-by: default avatarMarkus Stenberg <markus.stenberg@iki.fi>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 5ebe6afa
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -581,7 +581,7 @@ static int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
	if (name == NULL)
	if (name == NULL)
		goto out_put;
		goto out_put;


	fd = file_create(name, mode & S_IFMT);
	fd = file_create(name, mode & 0777);
	if (fd < 0)
	if (fd < 0)
		error = fd;
		error = fd;
	else
	else