From d0f88f8d5da674445f23ace60bb1896f4a3a3783 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 31 Mar 2015 12:30:48 -0400 Subject: acct: check FMODE_CAN_WRITE it's not calling ->write() directly anymore. Signed-off-by: Al Viro --- kernel/acct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/acct.c b/kernel/acct.c index e6c10d1a..74963d1 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; -- cgit v1.1