diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-03-12 02:31:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-12 13:04:02 -0400 |
commit | b330e6a49dc3e9145de5c986b29bbbb884351e92 (patch) | |
tree | 63db17312ade77feb9a1a8d311ce877a87687763 /drivers/md/raid5-ppl.c | |
parent | ee9c5e67557f9663b27946ba1d3813fb1924b1fe (diff) |
md: convert to kvmalloc
The code really just wants a big flat buffer, so just do that.
Link: http://lkml.kernel.org/r/20181217131929.11727-3-kent.overstreet@gmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Reviewed-by: Matthew Wilcox <willy@infradead.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Eric Paris <eparis@parisplace.org>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Pravin B Shelar <pshelar@ovn.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/raid5-ppl.c')
-rw-r--r-- | drivers/md/raid5-ppl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c index 3a7c36326589..0b096ddc9c1e 100644 --- a/drivers/md/raid5-ppl.c +++ b/drivers/md/raid5-ppl.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/blkdev.h> | 16 | #include <linux/blkdev.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/crc32c.h> | 18 | #include <linux/crc32c.h> |
19 | #include <linux/flex_array.h> | ||
20 | #include <linux/async_tx.h> | 19 | #include <linux/async_tx.h> |
21 | #include <linux/raid/md_p.h> | 20 | #include <linux/raid/md_p.h> |
22 | #include "md.h" | 21 | #include "md.h" |
@@ -165,7 +164,7 @@ ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu, | |||
165 | struct dma_async_tx_descriptor *tx) | 164 | struct dma_async_tx_descriptor *tx) |
166 | { | 165 | { |
167 | int disks = sh->disks; | 166 | int disks = sh->disks; |
168 | struct page **srcs = flex_array_get(percpu->scribble, 0); | 167 | struct page **srcs = percpu->scribble; |
169 | int count = 0, pd_idx = sh->pd_idx, i; | 168 | int count = 0, pd_idx = sh->pd_idx, i; |
170 | struct async_submit_ctl submit; | 169 | struct async_submit_ctl submit; |
171 | 170 | ||
@@ -196,8 +195,7 @@ ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu, | |||
196 | } | 195 | } |
197 | 196 | ||
198 | init_async_submit(&submit, ASYNC_TX_FENCE|ASYNC_TX_XOR_ZERO_DST, tx, | 197 | init_async_submit(&submit, ASYNC_TX_FENCE|ASYNC_TX_XOR_ZERO_DST, tx, |
199 | NULL, sh, flex_array_get(percpu->scribble, 0) | 198 | NULL, sh, (void *) (srcs + sh->disks + 2)); |
200 | + sizeof(struct page *) * (sh->disks + 2)); | ||
201 | 199 | ||
202 | if (count == 1) | 200 | if (count == 1) |
203 | tx = async_memcpy(sh->ppl_page, srcs[0], 0, 0, PAGE_SIZE, | 201 | tx = async_memcpy(sh->ppl_page, srcs[0], 0, 0, PAGE_SIZE, |