bcache: Don't bother with bucket refcount for btree node allocations
authorKent Overstreet <kmo@daterainc.com>
Wed, 24 Jul 2013 23:46:42 +0000 (16:46 -0700)
committerKent Overstreet <kmo@daterainc.com>
Mon, 11 Nov 2013 05:56:34 +0000 (21:56 -0800)
commit3a3b6a4e075188342b58d4b6560f5540af64cac0
tree5c64e4cdcb292d3b0a9e1d9f16e461ff5c4fdcbe
parent280481d06c8a683d9aaa26125476222e76b733c5
bcache: Don't bother with bucket refcount for btree node allocations

The bucket refcount (dropped with bkey_put()) is only needed to prevent
the newly allocated bucket from being garbage collected until we've
added a pointer to it somewhere. But for btree node allocations, the
fact that we have btree nodes locked is enough to guard against races
with garbage collection.

Eventually the per bucket refcount is going to be replaced with
something specific to bch_alloc_sectors().

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/alloc.c
drivers/md/bcache/btree.c
drivers/md/bcache/btree.h
drivers/md/bcache/super.c