diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-12-21 04:00:34 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:52 +0300 |
commit | dbe17f18838df6d0facf51b43cdc5efd372c28d6 (patch) | |
tree | 4479f5851137c95be806ea67bf04f9acaaa8c82e /fs/bcachefs/alloc_background.c | |
parent | facafdcbc157686311dbe58649ef9d29fcf8e610 (diff) | |
download | linux-dbe17f18838df6d0facf51b43cdc5efd372c28d6.tar.xz |
bcachefs: BKEY_INVALID_FROM_JOURNAL
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 8b15d7a78933..e8412fb1547e 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -280,11 +280,9 @@ int bch2_alloc_v4_invalid(const struct bch_fs *c, struct bkey_s_c k, return -BCH_ERR_invalid_bkey; } - /* - * XXX this is wrong, we'll be checking updates that happened from - * before BCH_FS_CHECK_BACKPOINTERS_DONE - */ - if (rw == WRITE && test_bit(BCH_FS_CHECK_BACKPOINTERS_DONE, &c->flags)) { + if (rw == WRITE && + !(flags & BKEY_INVALID_FROM_JOURNAL) && + test_bit(BCH_FS_CHECK_BACKPOINTERS_DONE, &c->flags)) { unsigned i, bp_len = 0; for (i = 0; i < BCH_ALLOC_V4_NR_BACKPOINTERS(a.v); i++) |