ext4: Configure dentry operations at dentry-creation time
authorGabriel Krisman Bertazi <krisman@suse.de>
Wed, 21 Feb 2024 17:14:09 +0000 (12:14 -0500)
committerGabriel Krisman Bertazi <krisman@suse.de>
Tue, 27 Feb 2024 21:55:34 +0000 (16:55 -0500)
commit04aa5f4eba49d6493801d0f1d515ed237459b166
treee382656da351470907f504b0e7319d443fa41b72
parent70dfe3f0d239c2e8abc6a7bea24411031f85b652
ext4: Configure dentry operations at dentry-creation time

This was already the case for case-insensitive before commit
bb9cd9106b22 ("fscrypt: Have filesystems handle their d_ops"), but it
was changed to set at lookup-time to facilitate the integration with
fscrypt.  But it's a problem because dentries that don't get created
through ->lookup() won't have any visibility of the operations.

Since fscrypt now also supports configuring dentry operations at
creation-time, do it for any encrypted and/or casefold volume,
simplifying the implementation across these features.

Acked-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20240221171412.10710-8-krisman@suse.de
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
fs/ext4/namei.c
fs/ext4/super.c