Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276463
b: refs/heads/master
c: 97c34f3
h: refs/heads/master
i:
  276461: ad19542
  276459: 98384bb
  276455: cef90c9
  276447: 2fb4188
v: v3
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Dec 6, 2011
1 parent 697b674 commit e94f5ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f655e8d2a7cdc41943f929e86054051d7441ec5
refs/heads/master: 97c34f3b04978799fd6eada69e1a8d84b74d9599
12 changes: 1 addition & 11 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
static int sub_api_initialized;

static struct workqueue_struct *target_completion_wq;
static struct kmem_cache *se_cmd_cache;
static struct kmem_cache *se_sess_cache;
struct kmem_cache *se_tmr_req_cache;
struct kmem_cache *se_ua_cache;
Expand All @@ -87,19 +86,13 @@ static void target_complete_ok_work(struct work_struct *work);

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",
sizeof(struct se_tmr_req), __alignof__(struct se_tmr_req),
0, NULL);
if (!se_tmr_req_cache) {
pr_err("kmem_cache_create() for struct se_tmr_req"
" failed\n");
goto out_free_cmd_cache;
goto out;
}
se_sess_cache = kmem_cache_create("se_sess_cache",
sizeof(struct se_session), __alignof__(struct se_session),
Expand Down Expand Up @@ -182,16 +175,13 @@ int init_se_kmem_caches(void)
kmem_cache_destroy(se_sess_cache);
out_free_tmr_req_cache:
kmem_cache_destroy(se_tmr_req_cache);
out_free_cmd_cache:
kmem_cache_destroy(se_cmd_cache);
out:
return -ENOMEM;
}

void release_se_kmem_caches(void)
{
destroy_workqueue(target_completion_wq);
kmem_cache_destroy(se_cmd_cache);
kmem_cache_destroy(se_tmr_req_cache);
kmem_cache_destroy(se_sess_cache);
kmem_cache_destroy(se_ua_cache);
Expand Down

0 comments on commit e94f5ba

Please sign in to comment.