For filesystems with encoding (i.e. with case-insensitive support), set the dentry operations for the super block with generic_set_sb_d_ops(). Also, use the upper layer encoding as the ovl super block encoding. Signed-off-by: André Almeida <andrealmeid@xxxxxxxxxx> --- fs/overlayfs/super.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index cfe8010616414a5ec0421b9ac5947596bfd0a5bd..5d55a287a8c0f69aeaf2ada862c59bd7eb7b10f2 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1423,6 +1423,16 @@ int ovl_fill_super(struct super_block *sb, struct fs_context *fc) sb->s_stack_depth = upper_sb->s_stack_depth; sb->s_time_gran = upper_sb->s_time_gran; + +#if IS_ENABLED(CONFIG_UNICODE) + if (sb_has_encoding(upper_sb)) { + sb->s_encoding = upper_sb->s_encoding; + sb->s_encoding_flags = upper_sb->s_encoding_flags; + } + + generic_set_sb_d_ops(sb); +#endif + } oe = ovl_get_lowerstack(sb, ctx, ofs, layers); err = PTR_ERR(oe); -- 2.50.1