target: Get rid of unused se_cmd_cache
Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
committed by
Nicholas Bellinger
parent
5f655e8d2a
commit
97c34f3b04
@@ -61,7 +61,6 @@
|
|||||||
static int sub_api_initialized;
|
static int sub_api_initialized;
|
||||||
|
|
||||||
static struct workqueue_struct *target_completion_wq;
|
static struct workqueue_struct *target_completion_wq;
|
||||||
static struct kmem_cache *se_cmd_cache;
|
|
||||||
static struct kmem_cache *se_sess_cache;
|
static struct kmem_cache *se_sess_cache;
|
||||||
struct kmem_cache *se_tmr_req_cache;
|
struct kmem_cache *se_tmr_req_cache;
|
||||||
struct kmem_cache *se_ua_cache;
|
struct kmem_cache *se_ua_cache;
|
||||||
@@ -87,19 +86,13 @@ static void target_complete_ok_work(struct work_struct *work);
|
|||||||
|
|
||||||
int init_se_kmem_caches(void)
|
int init_se_kmem_caches(void)
|
||||||
{
|
{
|
||||||
se_cmd_cache = kmem_cache_create("se_cmd_cache",
|
|
||||||
sizeof(struct se_cmd), __alignof__(struct se_cmd), 0, NULL);
|
|
||||||
if (!se_cmd_cache) {
|
|
||||||
pr_err("kmem_cache_create for struct se_cmd failed\n");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
se_tmr_req_cache = kmem_cache_create("se_tmr_cache",
|
se_tmr_req_cache = kmem_cache_create("se_tmr_cache",
|
||||||
sizeof(struct se_tmr_req), __alignof__(struct se_tmr_req),
|
sizeof(struct se_tmr_req), __alignof__(struct se_tmr_req),
|
||||||
0, NULL);
|
0, NULL);
|
||||||
if (!se_tmr_req_cache) {
|
if (!se_tmr_req_cache) {
|
||||||
pr_err("kmem_cache_create() for struct se_tmr_req"
|
pr_err("kmem_cache_create() for struct se_tmr_req"
|
||||||
" failed\n");
|
" failed\n");
|
||||||
goto out_free_cmd_cache;
|
goto out;
|
||||||
}
|
}
|
||||||
se_sess_cache = kmem_cache_create("se_sess_cache",
|
se_sess_cache = kmem_cache_create("se_sess_cache",
|
||||||
sizeof(struct se_session), __alignof__(struct se_session),
|
sizeof(struct se_session), __alignof__(struct se_session),
|
||||||
@@ -182,8 +175,6 @@ out_free_sess_cache:
|
|||||||
kmem_cache_destroy(se_sess_cache);
|
kmem_cache_destroy(se_sess_cache);
|
||||||
out_free_tmr_req_cache:
|
out_free_tmr_req_cache:
|
||||||
kmem_cache_destroy(se_tmr_req_cache);
|
kmem_cache_destroy(se_tmr_req_cache);
|
||||||
out_free_cmd_cache:
|
|
||||||
kmem_cache_destroy(se_cmd_cache);
|
|
||||||
out:
|
out:
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
@@ -191,7 +182,6 @@ out:
|
|||||||
void release_se_kmem_caches(void)
|
void release_se_kmem_caches(void)
|
||||||
{
|
{
|
||||||
destroy_workqueue(target_completion_wq);
|
destroy_workqueue(target_completion_wq);
|
||||||
kmem_cache_destroy(se_cmd_cache);
|
|
||||||
kmem_cache_destroy(se_tmr_req_cache);
|
kmem_cache_destroy(se_tmr_req_cache);
|
||||||
kmem_cache_destroy(se_sess_cache);
|
kmem_cache_destroy(se_sess_cache);
|
||||||
kmem_cache_destroy(se_ua_cache);
|
kmem_cache_destroy(se_ua_cache);
|
||||||
|
Reference in New Issue
Block a user