forked from Minki/linux
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
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user