projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bcache: fix a livelock when we cause a huge number of cache misses
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
md
/
bcache
/
btree.c
diff --git
a/drivers/md/bcache/btree.c
b/drivers/md/bcache/btree.c
index 83392f856dfd5d86e67cc636ab61e0fb0f16750d..4a1179cbc52e93a0dd0d56b88932af4b27399ccc 100644
(file)
--- a/
drivers/md/bcache/btree.c
+++ b/
drivers/md/bcache/btree.c
@@
-2162,8
+2162,10
@@
int bch_btree_insert_check_key(struct btree *b, struct btree_op *op,
rw_lock(true, b, b->level);
if (b->key.ptr[0] != btree_ptr ||
- b->seq != seq + 1)
+ b->seq != seq + 1) {
+ op->lock = b->level;
goto out;
+ }
}
SET_KEY_PTRS(check_key, 1);