Commit 63d63b51 authored by Coly Li's avatar Coly Li Committed by Jens Axboe

bcache: add comments for closure_fn to be called in closure_queue()

Add code comments to explain which call back function might be called
for the closure_queue(). This is an effort to make code to be more
understandable for readers.
Signed-off-by: default avatarColy Li <colyli@suse.de>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent bb6d355c
...@@ -662,6 +662,11 @@ static const struct block_device_operations bcache_ops = { ...@@ -662,6 +662,11 @@ static const struct block_device_operations bcache_ops = {
void bcache_device_stop(struct bcache_device *d) void bcache_device_stop(struct bcache_device *d)
{ {
if (!test_and_set_bit(BCACHE_DEV_CLOSING, &d->flags)) if (!test_and_set_bit(BCACHE_DEV_CLOSING, &d->flags))
/*
* closure_fn set to
* - cached device: cached_dev_flush()
* - flash dev: flash_dev_flush()
*/
closure_queue(&d->cl); closure_queue(&d->cl);
} }
...@@ -1675,6 +1680,7 @@ static void __cache_set_unregister(struct closure *cl) ...@@ -1675,6 +1680,7 @@ static void __cache_set_unregister(struct closure *cl)
void bch_cache_set_stop(struct cache_set *c) void bch_cache_set_stop(struct cache_set *c)
{ {
if (!test_and_set_bit(CACHE_SET_STOPPING, &c->flags)) if (!test_and_set_bit(CACHE_SET_STOPPING, &c->flags))
/* closure_fn set to __cache_set_unregister() */
closure_queue(&c->caching); closure_queue(&c->caching);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment