Commit 12fc7044 authored by Namjae Jeon's avatar Namjae Jeon
Browse files

cifsd: call kzalloc() directly instead of wrapper



Call kzalloc() directly instead of wrapper function.

Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 533a45da
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -104,11 +104,6 @@ static struct shash_desc *alloc_shash_desc(int id)
	return shash;
}

static struct ksmbd_crypto_ctx *ctx_alloc(void)
{
	return kzalloc(sizeof(struct ksmbd_crypto_ctx), GFP_KERNEL);
}

static void ctx_free(struct ksmbd_crypto_ctx *ctx)
{
	int i;
@@ -145,7 +140,7 @@ static struct ksmbd_crypto_ctx *ksmbd_find_crypto_ctx(void)
		ctx_list.avail_ctx++;
		spin_unlock(&ctx_list.ctx_lock);

		ctx = ctx_alloc();
		ctx = kzalloc(sizeof(struct ksmbd_crypto_ctx), GFP_KERNEL);
		if (!ctx) {
			spin_lock(&ctx_list.ctx_lock);
			ctx_list.avail_ctx--;
@@ -280,7 +275,7 @@ int ksmbd_crypto_create(void)
	init_waitqueue_head(&ctx_list.ctx_wait);
	ctx_list.avail_ctx = 1;

	ctx = ctx_alloc();
	ctx = kzalloc(sizeof(struct ksmbd_crypto_ctx), GFP_KERNEL);
	if (!ctx)
		return -ENOMEM;
	list_add(&ctx->list, &ctx_list.idle_ctx);