提交 a718c922 编写于 作者: R 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: NMarkus Stenberg <markus.stenberg@iki.fi>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册