diff options
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 | ||