From b65a9cfc2c38eebc33533280b8ad5841caee8b6e Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 16 Dec 2009 06:27:40 -0500 Subject: Untangling ima mess, part 2: deal with counters * do ima_get_count() in __dentry_open() * stop doing that in followups * move ima_path_check() to right after nameidata_to_filp() * don't bump counters on it Signed-off-by: Al Viro --- fs/open.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/open.c') diff --git a/fs/open.c b/fs/open.c index d95651e8be9e..ca69241796bd 100644 --- a/fs/open.c +++ b/fs/open.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "internal.h" @@ -857,6 +858,7 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, if (error) goto cleanup_all; } + ima_counts_get(f); f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); -- cgit v1.2.3