diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-03-15 21:03:12 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-03-15 21:03:12 -0400 |
commit | fea53adec6cd4632ca9833e2542b7f228123dc8b (patch) | |
tree | b804f29dd20409511c0a0e1d8349e52a8f378452 | |
parent | 763d3217dbb046922d24d56ca1fcbc6a438ab494 (diff) |
bcachefs: fix another writethrough bug
-rw-r--r-- | fs/bcachefs/io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index d1fb89c58ee3..7ee9c3928039 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -732,11 +732,11 @@ static void __bch2_write(struct closure *cl) int ret; do { - if (op->open_buckets_nr + op->nr_replicas > + /* +1 for possible cache device: */ + if (op->open_buckets_nr + op->nr_replicas + 1 > ARRAY_SIZE(op->open_buckets)) continue_at(cl, bch2_write_index, index_update_wq(op)); - /* for the device pointers and 1 for the chksum */ if (bch2_keylist_realloc(&op->insert_keys, op->inline_keys, ARRAY_SIZE(op->inline_keys), |