linux-stable/fs/crypto
Mateusz Guzik 7f016edaa0 fscrypt: try to avoid refing parent dentry in fscrypt_file_open
Merely checking if the directory is encrypted happens for every open
when using ext4, at the moment refing and unrefing the parent, costing 2
atomics and serializing opens of different files.

The most common case of encryption not being used can be checked for
with RCU instead.

Sample result from open1_processes -t 20 ("Separate file open/close")
from will-it-scale on Sapphire Rapids (ops/s):
before:	12539898
after:	25575494 (+103%)

v2:
- add a comment justifying rcu usage, submitted by Eric Biggers
- whack spurious IS_ENCRYPTED check from the refed case

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20240508081400.422212-1-mjguzik@gmail.com
Signed-off-by: Eric Biggers <ebiggers@google.com>
2024-05-08 10:28:58 -07:00
..
bio.c fscrypt: rename fscrypt_info => fscrypt_inode_info 2023-10-08 20:44:26 -07:00
crypto.c fscrypt: rename fscrypt_info => fscrypt_inode_info 2023-10-08 20:44:26 -07:00
fname.c fs: Create a generic is_dot_dotdot() utility 2024-01-23 10:58:56 -05:00
fscrypt_private.h fscrypt: shrink the size of struct fscrypt_inode_info slightly 2024-02-23 22:03:48 -08:00
hkdf.c fscrypt: use WARN_ON_ONCE instead of WARN_ON 2023-03-27 21:15:50 -07:00
hooks.c fscrypt: try to avoid refing parent dentry in fscrypt_file_open 2024-05-08 10:28:58 -07:00
inline_crypt.c fscrypt: rename fscrypt_info => fscrypt_inode_info 2023-10-08 20:44:26 -07:00
Kconfig fscrypt: document that CephFS supports fscrypt now 2023-12-26 22:55:42 -06:00
keyring.c fscrypt: clear keyring before calling key_put() 2024-02-06 16:55:35 -08:00
keysetup.c fscrypt: write CBC-CTS instead of CTS-CBC 2024-02-23 21:38:59 -08:00
keysetup_v1.c This update includes the following changes: 2023-11-02 16:15:30 -10:00
Makefile fscrypt: add inline encryption support 2020-07-08 10:29:30 -07:00
policy.c fscrypt: rename fscrypt_info => fscrypt_inode_info 2023-10-08 20:44:26 -07:00