summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-03-31 12:30:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:27:55 -0400
commitd0f88f8d5da674445f23ace60bb1896f4a3a3783 (patch)
tree685ec43a677db26248f1dbddb524bce7811424bd
parent47e393622bbdd48aa21837eb2c55ee1c359e080c (diff)
downloadlinux-d0f88f8d5da674445f23ace60bb1896f4a3a3783.tar.gz
linux-d0f88f8d5da674445f23ace60bb1896f4a3a3783.tar.bz2
linux-d0f88f8d5da674445f23ace60bb1896f4a3a3783.zip
acct: check FMODE_CAN_WRITE
it's not calling ->write() directly anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--kernel/acct.c2
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)
return -EACCES;
}
- if (!file->f_op->write) {
+ if (!(file->f_mode & FMODE_CAN_WRITE)) {
kfree(acct);
filp_close(file, NULL);
return -EIO;