summaryrefslogtreecommitdiff
path: root/security/integrity/ima/ima_iint.c
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2010-11-02 17:10:56 +0300
committerMimi Zohar <zohar@linux.vnet.ibm.com>2011-02-10 15:51:43 +0300
commita68a27b6f2354273bacc39c3dd06456edb202230 (patch)
treed73396dab134842ecd1e86d665718e75012e7e78 /security/integrity/ima/ima_iint.c
parent75a25637bf8a1b8fbed2368c0a3ec15c66a534f1 (diff)
downloadlinux-a68a27b6f2354273bacc39c3dd06456edb202230.tar.xz
IMA: convert i_readcount to atomic
Convert the inode's i_readcount from an unsigned int to atomic. Signed-off-by: Mimi Zohar <zohar@us.ibm.com> Acked-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security/integrity/ima/ima_iint.c')
-rw-r--r--security/integrity/ima/ima_iint.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c
index c442e47b6785..f0053552fd58 100644
--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -137,10 +137,11 @@ void ima_inode_free(struct inode *inode)
{
struct ima_iint_cache *iint;
- if (inode->i_readcount)
- printk(KERN_INFO "%s: readcount: %u\n", __func__, inode->i_readcount);
+ if (atomic_read(&inode->i_readcount))
+ printk(KERN_INFO "%s: readcount: %u\n", __func__,
+ atomic_read(&inode->i_readcount));
- inode->i_readcount = 0;
+ atomic_set(&inode->i_readcount, 0);
if (!IS_IMA(inode))
return;