diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-31 18:30:48 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-12 04:27:55 +0200 |
commit | d0f88f8d5da674445f23ace60bb1896f4a3a3783 (patch) | |
tree | 685ec43a677db26248f1dbddb524bce7811424bd /kernel/acct.c | |
parent | aio_run_iocb(): kill dead check (diff) | |
download | linux-d0f88f8d5da674445f23ace60bb1896f4a3a3783.tar.xz 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>
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) return -EACCES; } - if (!file->f_op->write) { + if (!(file->f_mode & FMODE_CAN_WRITE)) { kfree(acct); filp_close(file, NULL); return -EIO; |