diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-10-19 21:09:32 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-10-20 02:34:46 -0400 |
commit | 030b07720be0f3bfada12ff6bfa3c61a91212f32 (patch) | |
tree | 591325a099403876dc808e5a38dbfe3d10957b6d /crypto | |
parent | 5676470f06f783aebf545c8f17ca772911022068 (diff) |
async_pq: rename scribble page
The global scribble page is used as a temporary destination buffer when
disabling the P or Q result is requested. The local scribble buffer
contains memory for performing address conversions. Rename the global
variable to avoid confusion.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'crypto')
-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); |