Re: [PATCH v3 1/2] xor: use kmalloc() in calibrate_xor_blocks()

Mike Rapoport <[email protected]>
Newsgroups gmane.linux.raid,gmane.linux.kernel,gmane.linux.kernel.mm
Message-ID <[email protected]>
On Thu, May 28, 2026 at 01:54:44AM -0700, Christoph Hellwig wrote:
> On Thu, May 28, 2026 at 10:27:55AM +0300, Mike Rapoport (Microsoft) wrote:
> > -	b1 = (void *) __get_free_pages(GFP_KERNEL, 2);
> > +	b1 = kmalloc(PAGE_SIZE * 4, GFP_KERNEL);
> >  	if (!b1) {
> >  		pr_warn("xor: Yikes!  No memory available.\n");
> >  		return -ENOMEM;
> > @@ -132,7 +133,7 @@ static int __init calibrate_xor_blocks(void)
> >  	pr_info("xor: using function: %s (%d MB/sec)\n",
> >  	       fastest->name, fastest->speed);
> >  
> > -	free_pages((unsigned long)b1, 2);
> > +	kvfree(b1);
> 
> This should be kfree now.

kvfree still works, but I'll send v4 for pedantry sake ;-P

-- 
Sincerely yours,
Mike.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.