bcache: Clean up keylist code

More random refactoring.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
Kent Overstreet
2013-07-24 17:24:25 -07:00
parent 4f3d40147b
commit c2f95ae2eb
5 changed files with 57 additions and 52 deletions

View File

@@ -438,13 +438,13 @@ static void bch_insert_data_error(struct closure *cl)
* from the keys we'll accomplish just that.
*/
struct bkey *src = op->keys.bottom, *dst = op->keys.bottom;
struct bkey *src = op->keys.keys, *dst = op->keys.keys;
while (src != op->keys.top) {
struct bkey *n = bkey_next(src);
SET_KEY_PTRS(src, 0);
bkey_copy(dst, src);
memmove(dst, src, bkey_bytes(src));
dst = bkey_next(dst);
src = n;