summaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/rdwr.c
diff options
context:
space:
mode:
authorMarc Dionne <marc.c.dionne@gmail.com>2009-12-01 14:09:24 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-01 07:35:11 -0800
commit3350b2acdd39d23db52710045536b943fe38a35c (patch)
treecafa0bd2883411209fd99aeddb92550802510298 /fs/cachefiles/rdwr.c
parentfa1dae4906982b5d896c07613b1fe42456133b1c (diff)
downloadlinux-3350b2acdd39d23db52710045536b943fe38a35c.tar.bz2
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 <marc.c.dionne@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/cachefiles/rdwr.c')
-rw-r--r--fs/cachefiles/rdwr.c2
1 files changed, 2 insertions, 0 deletions
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 <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;