mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
Avoid that unloading SCST hangs when using bcache
Although it seems to be bcache problem, remove the flush_scheduled_work() call because it is not necessary. Call cancel_delayed_work_sync() after unregistration from sysfs just in case a sysfs attribute would ever be added that allows to trigger pool purging directly. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5052 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1553,8 +1553,6 @@ static void sgv_pool_destroy(struct sgv_pool *pool)
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
cancel_delayed_work_sync(&pool->sgv_purge_work);
|
||||
|
||||
sgv_pool_flush(pool);
|
||||
|
||||
mutex_lock(&sgv_pools_mutex);
|
||||
@@ -1567,6 +1565,8 @@ static void sgv_pool_destroy(struct sgv_pool *pool)
|
||||
scst_sgv_sysfs_del(pool);
|
||||
#endif
|
||||
|
||||
cancel_delayed_work_sync(&pool->sgv_purge_work);
|
||||
|
||||
for (i = 0; i < pool->max_caches; i++) {
|
||||
if (pool->caches[i])
|
||||
kmem_cache_destroy(pool->caches[i]);
|
||||
@@ -1797,8 +1797,6 @@ void scst_sgv_pools_deinit(void)
|
||||
sgv_pool_destroy(sgv_norm_pool);
|
||||
sgv_pool_destroy(sgv_norm_clust_pool);
|
||||
|
||||
flush_scheduled_work();
|
||||
|
||||
kmem_cache_destroy(sgv_pool_cachep);
|
||||
|
||||
TRACE_EXIT();
|
||||
|
||||
Reference in New Issue
Block a user