From: Kent Overstreet Date: Mon, 19 May 2025 13:15:31 +0000 (-0400) Subject: bcachefs: Don't set bi_casefold on non directories X-Git-Tag: v6.16-rc1~211^2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3a7fd95e02a33cad16f3c455e482951bcbc7224;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Don't set bi_casefold on non directories bi_casefold only makes sense for directories, and since it's one of the variable length fields setting it unnecessarily wastes space. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index a17a952ea161f..ee00805078558 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -856,6 +856,9 @@ void bch2_inode_init_late(struct bch_inode_unpacked *inode_u, u64 now, BCH_INODE_OPTS() #undef x } + + if (!S_ISDIR(mode)) + inode_u->bi_casefold = 0; } void bch2_inode_init(struct bch_fs *c, struct bch_inode_unpacked *inode_u,