diff options
author | Alasdair G Kergon <agk@redhat.com> | 2007-07-12 12:26:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 18:01:08 -0400 |
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 @@ | |||
29 | static struct workqueue_struct *_kcopyd_wq; | 29 | static struct workqueue_struct *_kcopyd_wq; |
30 | static struct work_struct _kcopyd_work; | 30 | static struct work_struct _kcopyd_work; |
31 | 31 | ||
32 | static inline void wake(void) | 32 | static void wake(void) |
33 | { | 33 | { |
34 | queue_work(_kcopyd_wq, &_kcopyd_work); | 34 | queue_work(_kcopyd_wq, &_kcopyd_work); |
35 | } | 35 | } |
@@ -226,10 +226,7 @@ static LIST_HEAD(_pages_jobs); | |||
226 | 226 | ||
227 | static int jobs_init(void) | 227 | static int jobs_init(void) |
228 | { | 228 | { |
229 | _job_cache = kmem_cache_create("kcopyd-jobs", | 229 | _job_cache = KMEM_CACHE(kcopyd_job, 0); |
230 | sizeof(struct kcopyd_job), | ||
231 | __alignof__(struct kcopyd_job), | ||
232 | 0, NULL, NULL); | ||
233 | if (!_job_cache) | 230 | if (!_job_cache) |
234 | return -ENOMEM; | 231 | return -ENOMEM; |
235 | 232 | ||
@@ -258,7 +255,7 @@ static void jobs_exit(void) | |||
258 | * Functions to push and pop a job onto the head of a given job | 255 | * Functions to push and pop a job onto the head of a given job |
259 | * list. | 256 | * list. |
260 | */ | 257 | */ |
261 | static inline struct kcopyd_job *pop(struct list_head *jobs) | 258 | static struct kcopyd_job *pop(struct list_head *jobs) |
262 | { | 259 | { |
263 | struct kcopyd_job *job = NULL; | 260 | struct kcopyd_job *job = NULL; |
264 | unsigned long flags; | 261 | unsigned long flags; |
@@ -274,7 +271,7 @@ static inline struct kcopyd_job *pop(struct list_head *jobs) | |||
274 | return job; | 271 | return job; |
275 | } | 272 | } |
276 | 273 | ||
277 | static inline void push(struct list_head *jobs, struct kcopyd_job *job) | 274 | static void push(struct list_head *jobs, struct kcopyd_job *job) |
278 | { | 275 | { |
279 | unsigned long flags; | 276 | unsigned long flags; |
280 | 277 | ||