bcachefs: Fix bch2_mark_extent()

If an extent only contained cached or erasure coded pointers, there
won't be any devices in the normal dirty replicas list or an entry to
update.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2019-10-08 21:33:56 -04:00 committed by Kent Overstreet
parent bf974f9203
commit 332c6e5370

View file

@ -1063,7 +1063,8 @@ static int bch2_mark_extent(struct bch_fs *c, struct bkey_s_c k,
}
}
update_replicas(c, fs_usage, &r.e, dirty_sectors);
if (r.e.nr_devs)
update_replicas(c, fs_usage, &r.e, dirty_sectors);
return 0;
}