bcachefs: Fix endianness in casefold check/repair

Fixes: 010c894681 ("bcachefs: Check for casefolded dirents in non casefolded dirs")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet
2025-05-23 13:13:44 -04:00
parent b41ac97fe0
commit 016c4b48b8
2 changed files with 4 additions and 4 deletions

View File

@@ -2204,11 +2204,11 @@ static int check_dirent(struct btree_trans *trans, struct btree_iter *iter,
buf.buf))) {
struct qstr name = bch2_dirent_get_name(d);
u32 subvol = d.v->d_type == DT_SUBVOL
? d.v->d_parent_subvol
? le32_to_cpu(d.v->d_parent_subvol)
: 0;
u64 target = d.v->d_type == DT_SUBVOL
? d.v->d_child_subvol
: d.v->d_inum;
? le32_to_cpu(d.v->d_child_subvol)
: le64_to_cpu(d.v->d_inum);
u64 dir_offset;
ret = bch2_hash_delete_at(trans,

View File

@@ -209,7 +209,7 @@ enum bch_fsck_flags {
x(subvol_to_missing_root, 188, 0) \
x(subvol_root_wrong_bi_subvol, 189, FSCK_AUTOFIX) \
x(bkey_in_missing_snapshot, 190, 0) \
x(bkey_in_deleted_snapshot, 315, 0) \
x(bkey_in_deleted_snapshot, 315, FSCK_AUTOFIX) \
x(inode_pos_inode_nonzero, 191, 0) \
x(inode_pos_blockdev_range, 192, 0) \
x(inode_alloc_cursor_inode_bad, 301, 0) \