aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 14:37:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 14:37:48 -0400
commitf9ba5375a8aae4aeea6be15df77e24707a429812 (patch)
treec6388d7e40f0f6a70d7ba6a4d4aeaa0d1f5591f6 /include
parent45352bbf48e95078b4acd20774f49e72676e1e0f (diff)
parentbade72d607c4eb1b1d6c7852c493b75f065a56b5 (diff)
Merge branch 'ima-memory-use-fixes'
* ima-memory-use-fixes: IMA: fix the ToMToU logic IMA: explicit IMA i_flag to remove global lock on inode_delete IMA: drop refcnt from ima_iint_cache since it isn't needed IMA: only allocate iint when needed IMA: move read counter into struct inode IMA: use i_writecount rather than a private counter IMA: use inode->i_lock to protect read and write counters IMA: convert internal flags from long to char IMA: use unsigned int instead of long for counters IMA: drop the inode opencount since it isn't needed for operation IMA: use rbtree instead of radix tree for inode information cache
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4f34ff6e5558..bb20373d0b46 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -231,6 +231,7 @@ struct inodes_stat_t {
231#define S_NOCMTIME 128 /* Do not update file c/mtime */ 231#define S_NOCMTIME 128 /* Do not update file c/mtime */
232#define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ 232#define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */
233#define S_PRIVATE 512 /* Inode is fs-internal */ 233#define S_PRIVATE 512 /* Inode is fs-internal */
234#define S_IMA 1024 /* Inode has an associated IMA struct */
234 235
235/* 236/*
236 * Note that nosuid etc flags are inode-specific: setting some file-system 237 * Note that nosuid etc flags are inode-specific: setting some file-system
@@ -265,6 +266,7 @@ struct inodes_stat_t {
265#define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME) 266#define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME)
266#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) 267#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
267#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) 268#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
269#define IS_IMA(inode) ((inode)->i_flags & S_IMA)
268 270
269/* the read-only stuff doesn't really belong here, but any other place is 271/* the read-only stuff doesn't really belong here, but any other place is
270 probably as bad and I don't want to create yet another include file. */ 272 probably as bad and I don't want to create yet another include file. */
@@ -772,6 +774,10 @@ struct inode {
772 774
773 unsigned int i_flags; 775 unsigned int i_flags;
774 776
777#ifdef CONFIG_IMA
778 /* protected by i_lock */
779 unsigned int i_readcount; /* struct files open RO */
780#endif
775 atomic_t i_writecount; 781 atomic_t i_writecount;
776#ifdef CONFIG_SECURITY 782#ifdef CONFIG_SECURITY
777 void *i_security; 783 void *i_security;