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 <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet
2025-05-19 09:15:31 -04:00
parent a96c5e5045
commit c3a7fd95e0

View File

@@ -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,