linux/fs/ubifs
Eric Biggers 2c58d548f5 fscrypt: cache decrypted symlink target in ->i_link
Path lookups that traverse encrypted symlink(s) are very slow because
each encrypted symlink needs to be decrypted each time it's followed.
This also involves dropping out of rcu-walk mode.

Make encrypted symlinks faster by caching the decrypted symlink target
in ->i_link.  The first call to fscrypt_get_symlink() sets it.  Then,
the existing VFS path lookup code uses the non-NULL ->i_link to take the
fast path where ->get_link() isn't called, and lookups in rcu-walk mode
remain in rcu-walk mode.

Also set ->i_link immediately when a new encrypted symlink is created.

To safely free the symlink target after an RCU grace period has elapsed,
introduce a new function fscrypt_free_inode(), and make the relevant
filesystems call it just before actually freeing the inode.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-17 12:43:29 -04:00
..
auth.c crypto: drop mask=CRYPTO_ALG_ASYNC from 'shash' tfm allocations 2018-11-20 14:26:55 +08:00
budget.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
commit.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
compress.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
crypto.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
debug.c ubifs: Format changes for authentication support 2018-10-23 13:48:29 +02:00
debug.h ubifs: Rework ubifs_assert() 2018-08-15 00:25:21 +02:00
dir.c fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext 2019-04-17 10:07:51 -04:00
file.c mm: migrate: drop unused argument of migrate_page_move_mapping() 2018-12-28 12:11:51 -08:00
find.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
gc.c ubifs: Add auth nodes to garbage collector journal head 2018-10-23 13:48:40 +02:00
io.c ubifs: Create functions to embed a HMAC in a node 2018-10-23 13:48:37 +02:00
ioctl.c This pull request contains updates for both UBI and UBIFS: 2019-03-13 09:34:35 -07:00
journal.c ubifs: Add authentication nodes to journal 2018-10-23 13:48:39 +02:00
Kconfig fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
key.h ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
log.c ubifs: Add authentication nodes to journal 2018-10-23 13:48:39 +02:00
lprops.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
lpt_commit.c ubifs: authentication: Authenticate LPT 2018-10-23 13:48:47 +02:00
lpt.c ubifs: Fix memory leak on error condition 2018-12-13 22:09:13 +01:00
Makefile fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
master.c ubfis: authentication: Authenticate master node 2018-10-23 13:48:52 +02:00
misc.c ubifs: Allow setting assert action as mount parameter 2018-08-15 00:25:21 +02:00
misc.h ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
orphan.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
recovery.c ubifs: Do not update inode size in-place in authenticated mode 2018-10-23 13:48:57 +02:00
replay.c ubifs: Handle re-linking of inodes correctly while recovery 2018-12-13 22:18:24 +01:00
sb.c fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
scan.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
shrinker.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
super.c fscrypt: cache decrypted symlink target in ->i_link 2019-04-17 12:43:29 -04:00
tnc_commit.c ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
tnc_misc.c ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
tnc.c ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
ubifs-media.h ubifs: Format changes for authentication support 2018-10-23 13:48:29 +02:00
ubifs.h fscrypt: remove filesystem specific build config option 2019-01-23 23:56:43 -05:00
xattr.c Revert "ubifs: xattr: Don't operate on deleted inodes" 2018-09-20 21:37:41 +02:00