]> git.baikalelectronics.ru Git - kernel.git/commit
bdi: Shutdown writeback on all cgwbs in cgwb_bdi_destroy()
authorJan Kara <jack@suse.cz>
Thu, 23 Mar 2017 00:36:57 +0000 (01:36 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 23 Mar 2017 02:11:28 +0000 (20:11 -0600)
commite43bd708de3f90da6e97419bca29bbef467d142a
tree6a4070a385e86006c64868a2f9bd363ab002cfc8
parent59632dc44b654f439e3746693b2e71da7134187b
bdi: Shutdown writeback on all cgwbs in cgwb_bdi_destroy()

Currently we waited for all cgwbs to get freed in cgwb_bdi_destroy()
which also means that writeback has been shutdown on them. Since this
wait is going away, directly shutdown writeback on cgwbs from
cgwb_bdi_destroy() to avoid live writeback structures after
bdi_unregister() has finished. To make that safe with concurrent
shutdown from cgwb_release_workfn(), we also have to make sure
wb_shutdown() returns only after the bdi_writeback structure is really
shutdown.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
include/linux/backing-dev-defs.h
mm/backing-dev.c