diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-02-07 07:56:16 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-02-07 22:12:46 -0900 |
commit | 75a15b116765ae4c7d5f10541bc87218d4a67708 (patch) | |
tree | 489047efb4175728ccf48cb942ac1e493ee27caa | |
parent | 308e19ac0897ce3ed5e6ab1157f338b2fffa146e (diff) |
bcache: drop current->bio_list workaroundsblk-rescuer
-rw-r--r-- | drivers/md/bcache/btree.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index a43eedd5804d..ca0ee9939535 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -446,7 +446,6 @@ void __bch_btree_node_write(struct btree *b, struct closure *parent) trace_bcache_btree_write(b); - BUG_ON(current->bio_list); BUG_ON(b->written >= btree_blocks(b)); BUG_ON(b->written && !i->keys); BUG_ON(btree_bset_first(b)->seq != i->seq); @@ -539,8 +538,7 @@ static void bch_btree_leaf_dirty(struct btree *b, atomic_t *journal_ref) } /* Force write if set is too big */ - if (set_bytes(i) > PAGE_SIZE - 48 && - !current->bio_list) + if (set_bytes(i) > PAGE_SIZE - 48) bch_btree_node_write(b, NULL); } @@ -885,8 +883,6 @@ static struct btree *mca_alloc(struct cache_set *c, struct btree_op *op, { struct btree *b; - BUG_ON(current->bio_list); - lockdep_assert_held(&c->bucket_lock); if (mca_find(c, k)) @@ -955,8 +951,6 @@ err: * bch_btree_node_get - find a btree node in the cache and lock it, reading it * in from disk if necessary. * - * If IO is necessary and running under generic_make_request, returns -EAGAIN. - * * The btree node will have either a read or a write lock held, depending on * level and op->lock. */ @@ -972,9 +966,6 @@ retry: b = mca_find(c, k); if (!b) { - if (current->bio_list) - return ERR_PTR(-EAGAIN); - mutex_lock(&c->bucket_lock); b = mca_alloc(c, op, k, level); mutex_unlock(&c->bucket_lock); @@ -2124,10 +2115,7 @@ static int bch_btree_insert_node(struct btree *b, struct btree_op *op, return 0; split: - if (current->bio_list) { - op->lock = b->c->root->level + 1; - return -EAGAIN; - } else if (op->lock <= b->c->root->level) { + if (op->lock <= b->c->root->level) { op->lock = b->c->root->level + 1; return -EINTR; } else { @@ -2206,7 +2194,6 @@ int bch_btree_insert(struct cache_set *c, struct keylist *keys, struct btree_insert_op op; int ret = 0; - BUG_ON(current->bio_list); BUG_ON(bch_keylist_empty(keys)); bch_btree_op_init(&op.op, 0); |