Commit 3350b2ac authored by Marc Dionne's avatar Marc Dionne Committed by Linus Torvalds

CacheFiles: Update IMA counters when using dentry_open

When IMA is active, using dentry_open without updating the
IMA counters will result in free/open imbalance errors when
fput is eventually called.
Signed-off-by: default avatarMarc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fa1dae49
......@@ -11,6 +11,7 @@
#include <linux/mount.h>
#include <linux/file.h>
#include <linux/ima.h>
#include "internal.h"
/*
......@@ -922,6 +923,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
if (IS_ERR(file)) {
ret = PTR_ERR(file);
} else {
ima_counts_get(file);
ret = -EIO;
if (file->f_op->write) {
pos = (loff_t) page->index << PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment