提交 d0f88f8d 编写于 作者: A Al Viro

acct: check FMODE_CAN_WRITE

it's not calling ->write() directly anymore.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 47e39362
......@@ -213,7 +213,7 @@ static int acct_on(struct filename *pathname)
return -EACCES;
}
if (!file->f_op->write) {
if (!(file->f_mode & FMODE_CAN_WRITE)) {
kfree(acct);
filp_close(file, NULL);
return -EIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册