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:
parent
47e393622b
commit
d0f88f8d5d
1 changed files with 1 additions and 1 deletions
|
@ -213,7 +213,7 @@ static int acct_on(struct filename *pathname)
|
||||||
return -EACCES;
|
return -EACCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file->f_op->write) {
|
if (!(file->f_mode & FMODE_CAN_WRITE)) {
|
||||||
kfree(acct);
|
kfree(acct);
|
||||||
filp_close(file, NULL);
|
filp_close(file, NULL);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
Loading…
Add table
Reference in a new issue