diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-16 06:27:40 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-16 12:16:47 -0500 |
commit | b65a9cfc2c38eebc33533280b8ad5841caee8b6e (patch) | |
tree | d6e5b713615cc5e65c900162ab09235ae4847909 /fs/open.c | |
parent | 0552f879d45cecc35d8e372a591fc5ed863bca58 (diff) |
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/audit.h> | 30 | #include <linux/audit.h> |
31 | #include <linux/falloc.h> | 31 | #include <linux/falloc.h> |
32 | #include <linux/fs_struct.h> | 32 | #include <linux/fs_struct.h> |
33 | #include <linux/ima.h> | ||
33 | 34 | ||
34 | #include "internal.h" | 35 | #include "internal.h" |
35 | 36 | ||
@@ -857,6 +858,7 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, | |||
857 | if (error) | 858 | if (error) |
858 | goto cleanup_all; | 859 | goto cleanup_all; |
859 | } | 860 | } |
861 | ima_counts_get(f); | ||
860 | 862 | ||
861 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); | 863 | f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); |
862 | 864 | ||