diff options
author | Alasdair G Kergon <agk@redhat.com> | 2007-07-12 17:26:32 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 15:01:08 -0700 |
commit | 028867ac28e51afc834a5931e7545c022557eded (patch) | |
tree | 0a268776ac68f26c86a28416b35a60ab54e3fb94 /drivers/md/kcopyd.c | |
parent | 79e15ae424afa0a40b1a0c4478046d6ba0b71e20 (diff) |
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 <clameter@sgi.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/kcopyd.c')
-rw-r--r-- | drivers/md/kcopyd.c | 11 |
1 files changed, 4 insertions, 7 deletions
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; |