u64 bch2_read_flag_list(char *opt, const char * const list[])
{
u64 ret = 0;
- char *p, *s, *d = kstrndup(opt, PAGE_SIZE - 1, GFP_KERNEL);
+ char *p, *s, *d = kstrdup(opt, GFP_KERNEL);
if (!d)
return -ENOMEM;
*/
u64 *bch2_acc_percpu_u64s(u64 __percpu *p, unsigned nr)
{
- u64 *ret;
+ u64 *ret = this_cpu_ptr(p);
int cpu;
- preempt_disable();
- ret = this_cpu_ptr(p);
- preempt_enable();
-
for_each_possible_cpu(cpu) {
u64 *i = per_cpu_ptr(p, cpu);