Skip to content

Commit a069f01

Browse files
author
Kent Overstreet
committed
bcachefs: Set bch_inode_unpacked.bi_snapshot in old inode path
This fixes a fsck bug on a very old filesystem (pre mainline merge). Fixes: 72350ee ("bcachefs: Kill snapshot arg to fsck_write_inode()") Reported-by: Marcin Mirosław <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
1 parent e04ee86 commit a069f01

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/bcachefs/inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ static noinline int bch2_inode_unpack_slowpath(struct bkey_s_c k,
283283
{
284284
memset(unpacked, 0, sizeof(*unpacked));
285285

286+
unpacked->bi_snapshot = k.k->p.snapshot;
287+
286288
switch (k.k->type) {
287289
case KEY_TYPE_inode: {
288290
struct bkey_s_c_inode inode = bkey_s_c_to_inode(k);

0 commit comments

Comments
 (0)