On 2018/7/31 7:24 PM, Shenghui Wang wrote: > Recal cached_dev_sectors on cached_dev detached, as recal done on > cached_dev attached. > > Signed-off-by: Shenghui Wang <shhuiw@xxxxxxxxxxx> Hi Shenghui, Nice catch, I will pick it for v4.19. Also I think this fix can also go into stable, I will CC it to stable@xxxxxxxxxxxxxxx too. Thanks. Coly Li > --- > drivers/md/bcache/super.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c > index fa4058e43202..d693fec8f39f 100644 > --- a/drivers/md/bcache/super.c > +++ b/drivers/md/bcache/super.c > @@ -991,6 +991,7 @@ static void cached_dev_detach_finish(struct work_struct *w) > > bcache_device_detach(&dc->disk); > list_move(&dc->list, &uncached_devices); > + calc_cached_dev_sectors(dc->disk->c); > > clear_bit(BCACHE_DEV_DETACHING, &dc->disk.flags); > clear_bit(BCACHE_DEV_UNLINK_DONE, &dc->disk.flags); > -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html