diff options
-rw-r--r-- | crypto/async_tx/async_pq.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c index 60476560e0b0..6b5cc4fba59f 100644 --- a/crypto/async_tx/async_pq.c +++ b/crypto/async_tx/async_pq.c | |||
@@ -26,9 +26,10 @@ | |||
26 | #include <linux/async_tx.h> | 26 | #include <linux/async_tx.h> |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * scribble - space to hold throwaway P buffer for synchronous gen_syndrome | 29 | * pq_scribble_page - space to hold throwaway P or Q buffer for |
30 | * synchronous gen_syndrome | ||
30 | */ | 31 | */ |
31 | static struct page *scribble; | 32 | static struct page *pq_scribble_page; |
32 | 33 | ||
33 | /* the struct page *blocks[] parameter passed to async_gen_syndrome() | 34 | /* the struct page *blocks[] parameter passed to async_gen_syndrome() |
34 | * and async_syndrome_val() contains the 'P' destination address at | 35 | * and async_syndrome_val() contains the 'P' destination address at |
@@ -226,11 +227,11 @@ async_gen_syndrome(struct page **blocks, unsigned int offset, int disks, | |||
226 | async_tx_quiesce(&submit->depend_tx); | 227 | async_tx_quiesce(&submit->depend_tx); |
227 | 228 | ||
228 | if (!P(blocks, disks)) { | 229 | if (!P(blocks, disks)) { |
229 | P(blocks, disks) = scribble; | 230 | P(blocks, disks) = pq_scribble_page; |
230 | BUG_ON(len + offset > PAGE_SIZE); | 231 | BUG_ON(len + offset > PAGE_SIZE); |
231 | } | 232 | } |
232 | if (!Q(blocks, disks)) { | 233 | if (!Q(blocks, disks)) { |
233 | Q(blocks, disks) = scribble; | 234 | Q(blocks, disks) = pq_scribble_page; |
234 | BUG_ON(len + offset > PAGE_SIZE); | 235 | BUG_ON(len + offset > PAGE_SIZE); |
235 | } | 236 | } |
236 | do_sync_gen_syndrome(blocks, offset, disks, len, submit); | 237 | do_sync_gen_syndrome(blocks, offset, disks, len, submit); |
@@ -384,9 +385,9 @@ EXPORT_SYMBOL_GPL(async_syndrome_val); | |||
384 | 385 | ||
385 | static int __init async_pq_init(void) | 386 | static int __init async_pq_init(void) |
386 | { | 387 | { |
387 | scribble = alloc_page(GFP_KERNEL); | 388 | pq_scribble_page = alloc_page(GFP_KERNEL); |
388 | 389 | ||
389 | if (scribble) | 390 | if (pq_scribble_page) |
390 | return 0; | 391 | return 0; |
391 | 392 | ||
392 | pr_err("%s: failed to allocate required spare page\n", __func__); | 393 | pr_err("%s: failed to allocate required spare page\n", __func__); |
@@ -396,7 +397,7 @@ static int __init async_pq_init(void) | |||
396 | 397 | ||
397 | static void __exit async_pq_exit(void) | 398 | static void __exit async_pq_exit(void) |
398 | { | 399 | { |
399 | put_page(scribble); | 400 | put_page(pq_scribble_page); |
400 | } | 401 | } |
401 | 402 | ||
402 | module_init(async_pq_init); | 403 | module_init(async_pq_init); |