Commit d0f88f8d authored by Al Viro's avatar Al Viro

acct: check FMODE_CAN_WRITE

it's not calling ->write() directly anymore.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment