From 028867ac28e51afc834a5931e7545c022557eded Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Thu, 12 Jul 2007 17:26:32 +0100 Subject: dm: use kmem_cache macro Use new KMEM_CACHE() macro and make the newly-exposed structure names more meaningful. Also remove some superfluous casts and inlines (let a modern compiler be the judge). Acked-by: Christoph Lameter Signed-off-by: Alasdair G Kergon Signed-off-by: Linus Torvalds --- drivers/md/kcopyd.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/md/kcopyd.c') diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index dbc234e3c69f..7e052378c47e 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c @@ -29,7 +29,7 @@ static struct workqueue_struct *_kcopyd_wq; static struct work_struct _kcopyd_work; -static inline void wake(void) +static void wake(void) { queue_work(_kcopyd_wq, &_kcopyd_work); } @@ -226,10 +226,7 @@ static LIST_HEAD(_pages_jobs); static int jobs_init(void) { - _job_cache = kmem_cache_create("kcopyd-jobs", - sizeof(struct kcopyd_job), - __alignof__(struct kcopyd_job), - 0, NULL, NULL); + _job_cache = KMEM_CACHE(kcopyd_job, 0); if (!_job_cache) return -ENOMEM; @@ -258,7 +255,7 @@ static void jobs_exit(void) * Functions to push and pop a job onto the head of a given job * list. */ -static inline struct kcopyd_job *pop(struct list_head *jobs) +static struct kcopyd_job *pop(struct list_head *jobs) { struct kcopyd_job *job = NULL; unsigned long flags; @@ -274,7 +271,7 @@ static inline struct kcopyd_job *pop(struct list_head *jobs) return job; } -static inline void push(struct list_head *jobs, struct kcopyd_job *job) +static void push(struct list_head *jobs, struct kcopyd_job *job) { unsigned long flags; -- cgit v1.2.1