Commit 016c4b48 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix endianness in casefold check/repair



Fixes: 010c8946 ("bcachefs: Check for casefolded dirents in non casefolded dirs")
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent b41ac97f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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)		\