[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1471282613-31006-6-git-send-email-linuxram@us.ibm.com>
Date: Mon, 15 Aug 2016 10:36:42 -0700
From: Ram Pai <linuxram@...ibm.com>
To: LKML <linux-kernel@...r.kernel.org>, linux-raid@...r.kernel.org,
dm-devel@...hat.com, linux-doc@...r.kernel.org
Cc: shli@...nel.org, agk@...hat.com, snitzer@...hat.com,
corbet@....net, Ram Pai <linuxram@...ibm.com>
Subject: [RFC PATCH 05/16] DM: allocation/free helper routines.
Helper functions to allocate/reallocate and free memory.
Signed-off-by: Ram Pai <linuxram@...ibm.com>
---
drivers/md/dm-inplace-compress.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-inplace-compress.c
index bf18028..c11567c 100644
--- a/drivers/md/dm-inplace-compress.c
+++ b/drivers/md/dm-inplace-compress.c
@@ -774,6 +774,23 @@ static void dm_icomp_get_req(struct dm_icomp_req *req)
atomic_inc(&req->io_pending);
}
+static void *dm_icomp_kmalloc(size_t size, gfp_t flags)
+{
+ return kmalloc(size, flags);
+}
+
+static void *dm_icomp_krealloc(void *addr, size_t size,
+ size_t orig_size, gfp_t flags)
+{
+ return krealloc(addr, size, flags);
+}
+
+static void dm_icomp_kfree(void *addr, unsigned int size)
+{
+ kfree(addr);
+}
+
+
static void dm_icomp_free_io_range(struct dm_icomp_io_range *io)
{
kfree(io->decomp_data);
--
1.7.1
Powered by blists - more mailing lists