Commit 699ae624 authored by Mateusz Guzik's avatar Mateusz Guzik Committed by Mimi Zohar
Browse files

evm: stop avoidably reading i_writecount in evm_file_release



The EVM_NEW_FILE flag is unset if the file already existed at the time
of open and this can be checked without looking at i_writecount.

Not accessing it reduces traffic on the cacheline during parallel open
of the same file and drop the evm_file_release routine from second place
to bottom of the profile.

Fixes: 75a323e6 ("evm: Make it independent from 'integrity' LSM")
Signed-off-by: default avatarMateusz Guzik <mjguzik@gmail.com>
Reviewed-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
Cc: stable@vger.kernel.org # 6.9+
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
parent 923168a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment