@@ -2272,7 +2272,6 @@ struct super_operations {
#define S_NOCMTIME (1 << 7) /* Do not update file c/mtime */
#define S_SWAPFILE (1 << 8) /* Do not truncate: swapon got its bmaps */
#define S_PRIVATE (1 << 9) /* Inode is fs-internal */
-#define S_IMA (1 << 10) /* Inode has an associated IMA struct */
#define S_AUTOMOUNT (1 << 11) /* Automount/referral quasi-directory */
#define S_NOSEC (1 << 12) /* no suid or xattr security attributes */
#ifdef CONFIG_FS_DAX
@@ -2330,7 +2329,6 @@ static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags
#endif
#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
-#define IS_IMA(inode) ((inode)->i_flags & S_IMA)
#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
#define IS_DAX(inode) ((inode)->i_flags & S_DAX)
@@ -26,9 +26,6 @@ static struct kmem_cache *ima_iint_cache __ro_after_init;
*/
struct ima_iint_cache *ima_iint_find(struct inode *inode)
{
- if (!IS_IMA(inode))
- return NULL;
-
return ima_inode_get_iint(inode);
}
@@ -102,7 +99,6 @@ struct ima_iint_cache *ima_inode_get(struct inode *inode)
ima_iint_init_always(iint, inode);
- inode->i_flags |= S_IMA;
ima_inode_set_iint(inode, iint);
return iint;
@@ -118,7 +114,6 @@ void ima_inode_free_rcu(void *inode_security)
{
struct ima_iint_cache **iint_p = inode_security + ima_blob_sizes.lbs_inode;
- /* *iint_p should be NULL if !IS_IMA(inode) */
if (*iint_p)
ima_iint_free(*iint_p);
}
@@ -126,7 +126,7 @@ static void ima_rdwr_violation_check(struct file *file,
bool send_tomtou = false, send_writers = false;
if (mode & FMODE_WRITE) {
- if (atomic_read(&inode->i_readcount) && IS_IMA(inode)) {
+ if (atomic_read(&inode->i_readcount)) {
if (!iint)
iint = ima_iint_find(inode);
/* IMA_MEASURE is set from reader side */