Commit 1c9e6d50 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet
Browse files

bcachefs: Fix missing field initialization



When unpacking v1 inodes, we were failing to initialize the journal_seq
field, leading to a BUG_ON() when fsync tries to flush a garbage journal
sequence number.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 531b69e9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ int bch2_inode_unpack(struct bkey_s_c k,
		struct bkey_s_c_inode inode = bkey_s_c_to_inode(k);

		unpacked->bi_inum	= inode.k->p.offset;
		unpacked->bi_journal_seq= 0;
		unpacked->bi_hash_seed	= inode.v->bi_hash_seed;
		unpacked->bi_flags	= le32_to_cpu(inode.v->bi_flags);
		unpacked->bi_mode	= le16_to_cpu(inode.v->bi_mode);