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
..
2019-03-17 09:10:56 -07:00
2018-08-22 10:52:51 -07:00
2019-03-28 08:54:20 -07:00
2019-03-07 18:32:01 -08:00
2019-01-04 13:13:47 -08:00
2019-04-11 14:19:02 -07:00
2018-11-30 16:00:58 +00:00
2019-03-27 19:00:37 +01:00
2019-04-01 14:33:38 -05:00
2018-10-30 12:46:25 -07:00
2019-04-17 12:43:29 -04:00
2019-04-01 00:31:02 -04:00
2019-01-24 13:38:30 -05:00
2019-02-03 11:17:31 -08:00
2019-01-25 18:41:52 +08:00
2018-07-22 14:13:44 +02:00
2018-11-23 09:08:17 -05:00
2019-03-07 09:01:33 -08:00
2019-04-17 12:43:29 -04:00
2019-04-17 12:43:29 -04:00
2019-03-07 18:32:01 -08:00
2018-11-30 15:57:31 +00:00
2019-04-14 15:09:40 -07:00
2019-03-09 11:52:11 -08:00
2018-11-30 14:56:14 -08:00
2019-01-04 13:13:47 -08:00
2018-08-17 16:20:28 -07:00
2019-03-12 09:58:03 -07:00
2019-04-05 16:02:31 -10:00
2018-09-29 22:47:48 -04:00
2019-03-01 00:36:57 -05:00
2019-04-01 00:31:02 -04:00
2018-09-20 09:28:49 -05:00
2019-03-12 14:08:19 -07:00
2019-03-18 22:39:34 -04:00
2019-04-11 15:23:48 -04:00
2019-03-12 15:06:54 -07:00
2019-02-06 13:12:15 -05:00
2019-03-19 09:29:07 +01:00
2018-12-28 12:11:47 -08:00
2019-03-29 10:01:37 -07:00
2018-11-18 13:35:19 -08:00
2019-03-12 13:27:20 -07:00
2019-02-13 11:14:46 +01:00
2019-04-04 09:17:15 -04:00
2019-02-12 13:45:53 -08:00
2018-12-18 18:29:15 +01:00
2018-10-31 08:54:14 -07:00
2018-08-02 09:34:02 -07:00
2019-03-16 10:31:02 -07:00
2018-11-10 08:02:40 -05:00
2018-07-31 11:32:44 -04:00
2019-04-17 12:43:29 -04:00
2019-03-18 16:30:02 +01:00
2018-08-17 16:20:27 -07:00
2019-03-26 08:37:55 -07:00
2019-04-04 20:13:59 -04:00
2019-03-05 10:00:35 -08:00
2019-03-07 18:32:01 -08:00
2019-02-18 16:49:36 -08:00
2019-04-11 21:22:21 -06:00
2019-02-28 13:59:41 -07:00
2018-08-27 14:48:48 +02:00
2018-10-29 14:29:58 -07:00
2018-10-03 16:47:43 +02:00
2019-03-01 17:24:48 -08:00
2019-04-17 10:05:51 -04:00
2019-02-15 08:40:11 -07:00
2019-02-01 15:46:24 -08:00
2019-03-07 18:32:01 -08:00
2019-03-07 18:32:01 -08:00
2018-10-03 16:47:43 +02:00
2019-02-28 08:24:23 -07:00
2019-03-08 14:48:40 -08:00
2019-02-28 03:29:26 -05:00
2019-02-28 03:29:37 -05:00
2019-03-29 10:01:38 -07:00
2019-01-21 17:48:13 +01:00
2019-01-22 14:39:38 -07:00
2019-03-05 21:07:13 -08:00
2019-02-28 03:28:53 -05:00
2019-04-08 10:51:01 -06:00
2019-01-03 18:57:57 -08:00
2019-03-18 10:44:48 -06:00
2019-03-12 14:08:19 -07:00
2018-08-02 08:06:55 +09:00
2019-03-25 08:36:24 -04:00
2019-03-12 14:08:19 -07:00
2019-01-30 17:44:07 -05:00
2019-02-15 08:40:11 -07:00
2019-04-17 12:43:14 -04:00
2019-03-12 14:08:19 -07:00
2019-04-06 07:01:55 -10:00
2019-04-14 15:09:40 -07:00
2019-01-30 17:14:50 -05:00
2019-01-30 17:14:50 -05:00
2019-04-06 07:01:55 -10:00
2019-01-03 18:57:57 -08:00
2019-02-07 00:13:27 +01:00
2018-08-17 16:20:28 -07:00
2018-10-03 16:47:43 +02:00
2019-04-14 15:09:40 -07:00
2019-02-01 01:55:45 -05:00
2019-02-07 16:38:35 +01:00
2019-02-28 03:29:38 -05:00
2019-02-07 00:13:27 +01:00
2018-12-28 12:11:51 -08:00
2019-02-07 00:13:27 +01:00
2018-09-18 07:30:48 -04:00