Skip to content

Commit 030b077

Browse files
committed
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>
1 parent 5676470 commit 030b077

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎crypto/async_tx/async_pq.c‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
#include <linux/async_tx.h>
2727

2828
/**
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
3031
*/
31-
static struct page *scribble;
32+
static struct page *pq_scribble_page;
3233

3334
/* the struct page *blocks[] parameter passed to async_gen_syndrome()
3435
* 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,
226227
async_tx_quiesce(&submit->depend_tx);
227228

228229
if (!P(blocks, disks)) {
229-
P(blocks, disks) = scribble;
230+
P(blocks, disks) = pq_scribble_page;
230231
BUG_ON(len + offset > PAGE_SIZE);
231232
}
232233
if (!Q(blocks, disks)) {
233-
Q(blocks, disks) = scribble;
234+
Q(blocks, disks) = pq_scribble_page;
234235
BUG_ON(len + offset > PAGE_SIZE);
235236
}
236237
do_sync_gen_syndrome(blocks, offset, disks, len, submit);
@@ -384,9 +385,9 @@ EXPORT_SYMBOL_GPL(async_syndrome_val);
384385

385386
static int __init async_pq_init(void)
386387
{
387-
scribble = alloc_page(GFP_KERNEL);
388+
pq_scribble_page = alloc_page(GFP_KERNEL);
388389

389-
if (scribble)
390+
if (pq_scribble_page)
390391
return 0;
391392

392393
pr_err("%s: failed to allocate required spare page\n", __func__);
@@ -396,7 +397,7 @@ static int __init async_pq_init(void)
396397

397398
static void __exit async_pq_exit(void)
398399
{
399-
put_page(scribble);
400+
put_page(pq_scribble_page);
400401
}
401402

402403
module_init(async_pq_init);

0 commit comments

Comments
 (0)