Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0f88f8d authored by Al Viro's avatar Al Viro
Browse files

acct: check FMODE_CAN_WRITE



it's not calling ->write() directly anymore.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 47e39362
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;