Re: [RFC PATCH v2 11/16] bcache: add comments for closure_fn to be called in closure_queue()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>

On 04/19/2019 11:24 AM, Coly Li wrote:
> 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: Coly Li <colyli@xxxxxxx>
> ---
>   drivers/md/bcache/super.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index 83a7cb0e0e45..9b41e0b62cc0 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -662,6 +662,11 @@ static const struct block_device_operations bcache_ops = {
>   void bcache_device_stop(struct bcache_device *d)
>   {
>   	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);
>   }
>
> @@ -1677,6 +1682,7 @@ static void __cache_set_unregister(struct closure *cl)
>   void bch_cache_set_stop(struct cache_set *c)
>   {
>   	if (!test_and_set_bit(CACHE_SET_STOPPING, &c->flags))
> +		/* closure_fn set to __cache_set_unregister() */
>   		closure_queue(&c->caching);
>   }
>
>





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux