diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-31 12:30:48 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:27:55 -0400 |
commit | d0f88f8d5da674445f23ace60bb1896f4a3a3783 (patch) | |
tree | 685ec43a677db26248f1dbddb524bce7811424bd /kernel/acct.c | |
parent | 47e393622bbdd48aa21837eb2c55ee1c359e080c (diff) |
acct: check FMODE_CAN_WRITE
it's not calling ->write() directly anymore.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/acct.c')
-rw-r--r-- | kernel/acct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index e6c10d1a4058..74963d192c5d 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -213,7 +213,7 @@ static int acct_on(struct filename *pathname) | |||
213 | return -EACCES; | 213 | return -EACCES; |
214 | } | 214 | } |
215 | 215 | ||
216 | if (!file->f_op->write) { | 216 | if (!(file->f_mode & FMODE_CAN_WRITE)) { |
217 | kfree(acct); | 217 | kfree(acct); |
218 | filp_close(file, NULL); | 218 | filp_close(file, NULL); |
219 | return -EIO; | 219 | return -EIO; |