diff options
author | Dmitry Kasatkin <dmitry.kasatkin@intel.com> | 2011-10-19 05:04:40 -0400 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2012-09-07 14:57:45 -0400 |
commit | bf2276d10ce58ff44ab8857266a6718024496af6 (patch) | |
tree | 7be39c026fd30856248f68c964d0f1e2ae703c25 /include/linux/integrity.h | |
parent | 07f6a79415d7d502ee0c7d02ace6594a7be7429a (diff) |
ima: allocating iint improvements
With IMA-appraisal's removal of the iint mutex and taking the i_mutex
instead, allocating the iint becomes a lot simplier, as we don't need
to be concerned with two processes racing to allocate the iint. This
patch cleans up and improves performance for allocating the iint.
- removed redundant double i_mutex locking
- combined iint allocation with tree search
Changelog v2:
- removed the rwlock/read_lock changes from this patch
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Diffstat (limited to 'include/linux/integrity.h')
-rw-r--r-- | include/linux/integrity.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/integrity.h b/include/linux/integrity.h index a0c41256cb92..66c5fe9550a5 100644 --- a/include/linux/integrity.h +++ b/include/linux/integrity.h | |||
@@ -22,13 +22,14 @@ enum integrity_status { | |||
22 | 22 | ||
23 | /* List of EVM protected security xattrs */ | 23 | /* List of EVM protected security xattrs */ |
24 | #ifdef CONFIG_INTEGRITY | 24 | #ifdef CONFIG_INTEGRITY |
25 | extern int integrity_inode_alloc(struct inode *inode); | 25 | extern struct integrity_iint_cache *integrity_inode_get(struct inode *inode); |
26 | extern void integrity_inode_free(struct inode *inode); | 26 | extern void integrity_inode_free(struct inode *inode); |
27 | 27 | ||
28 | #else | 28 | #else |
29 | static inline int integrity_inode_alloc(struct inode *inode) | 29 | static inline struct integrity_iint_cache * |
30 | integrity_inode_get(struct inode *inode) | ||
30 | { | 31 | { |
31 | return 0; | 32 | return NULL; |
32 | } | 33 | } |
33 | 34 | ||
34 | static inline void integrity_inode_free(struct inode *inode) | 35 | static inline void integrity_inode_free(struct inode *inode) |