libfs: Add helper to choose dentry operations at mount-time
authorGabriel Krisman Bertazi <krisman@suse.de>
Wed, 21 Feb 2024 17:14:08 +0000 (12:14 -0500)
committerGabriel Krisman Bertazi <krisman@suse.de>
Tue, 27 Feb 2024 21:55:34 +0000 (16:55 -0500)
commit70dfe3f0d239c2e8abc6a7bea24411031f85b652
treee3ec8120884b9c412c92017300b564009e3aaa1d
parente6ca2883d987a31051b39c18b16c39e7ce3a2cc0
libfs: Add helper to choose dentry operations at mount-time

In preparation to drop the similar helper that sets d_op at lookup time,
add a version to set the right d_op filesystem-wide, through sb->s_d_op.
The operations structures are shared across filesystems supporting
fscrypt and/or casefolding, therefore we can keep it in common libfs
code.

Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20240221171412.10710-7-krisman@suse.de
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
fs/libfs.c
include/linux/fs.h