diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-03-15 21:03:12 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-22 00:44:18 -0400 |
commit | a9b16bc03002954d6faae12e26a8e704fce32cc9 (patch) | |
tree | bc3e5c14acc59addc0068ea741dec0788289181a | |
parent | 619e80e6da64b1ba08e92fcc4ce8536e4f74c8c5 (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 f67d278d754c..739543fd572a 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -734,13 +734,13 @@ 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)); return; } - /* for the device pointers and 1 for the chksum */ if (bch2_keylist_realloc(&op->insert_keys, op->inline_keys, ARRAY_SIZE(op->inline_keys), |