acct: check FMODE_CAN_WRITE
it's not calling ->write() directly anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Родитель
47e393622b
Коммит
d0f88f8d5d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче