From: Marc Dionne Date: Tue, 1 Dec 2009 14:09:24 +0000 (+0000) Subject: CacheFiles: Update IMA counters when using dentry_open X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3350b2acdd39d23db52710045536b943fe38a35c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Marc Dionne Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index 1d8332563863..a6c8c6fe8df9 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -11,6 +11,7 @@ #include #include +#include #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;