Skip to content

Commit

Permalink
acct: check FMODE_CAN_WRITE
Browse files Browse the repository at this point in the history
it's not calling ->write() directly anymore.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 12, 2015
1 parent 47e3936 commit d0f88f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/acct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0f88f8

Please sign in to comment.