From: Dmitry Kasatkin Date: Fri, 13 Jun 2014 15:55:47 +0000 (+0300) Subject: ima: remove unnecessary i_mutex locking from ima_rdwr_violation_check() X-Git-Tag: omap-for-v3.17/fixes-against-rc2~151^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c50b964823ebb7f0a098878c399ce859cd38e9e;p=pandora-kernel.git ima: remove unnecessary i_mutex locking from ima_rdwr_violation_check() Before 2.6.39 inode->i_readcount was maintained by IMA. It was not atomic and protected using spinlock. For 2.6.39, i_readcount was converted to atomic and maintaining was moved VFS layer. Spinlock for some unclear reason was replaced by i_mutex. After analyzing the code, we came to conclusion that i_mutex locking is unnecessary, especially when an IMA policy has not been defined. This patch removes i_mutex locking from ima_rdwr_violation_check(). Signed-off-by: Dmitry Kasatkin Signed-off-by: Mimi Zohar --- Reading git-diff-tree failed