Commit a718c922 authored by Richard Weinberger's avatar Richard Weinberger

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
......@@ -581,7 +581,7 @@ static int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
if (name == NULL)
goto out_put;
fd = file_create(name, mode & S_IFMT);
fd = file_create(name, mode & 0777);
if (fd < 0)
error = fd;
else
......
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