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 | |
parent | 47e393622bbdd48aa21837eb2c55ee1c359e080c (diff) | |
download | linux-stable-d0f88f8d5da674445f23ace60bb1896f4a3a3783.tar.gz linux-stable-d0f88f8d5da674445f23ace60bb1896f4a3a3783.tar.bz2 linux-stable-d0f88f8d5da674445f23ace60bb1896f4a3a3783.zip |
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')
-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) return -EACCES; } - if (!file->f_op->write) { + if (!(file->f_mode & FMODE_CAN_WRITE)) { kfree(acct); filp_close(file, NULL); return -EIO; |