Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-18 Thread David Rientjes
On Mon, 9 Nov 2015, Tetsuo Handa wrote: > There are many locations that do > > if (memory_was_allocated_by_vmalloc) > vfree(ptr); > else > kfree(ptr); > > but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory > using is_vmalloc_addr(). Unless callers have special rea

RE: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread Luck, Tony
> ACK for the ACPI changes (and CCing Tony and Boris for the heads-up as they > are way more famailiar with the APEI code than I am). Sure. If kvfree() really is smart enough to figure it out then there it no point in the if (blah) kfree() else vfree(). The drivers/acpi/apei/erst.c code isn't doi

Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread Rafael J. Wysocki
On Monday, November 09, 2015 08:56:10 PM Tetsuo Handa wrote: > There are many locations that do > > if (memory_was_allocated_by_vmalloc) > vfree(ptr); > else > kfree(ptr); > > but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory > using is_vmalloc_addr(). Unless call

Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread Dilger, Andreas
On 2015/11/09, 04:56, "Tetsuo Handa" wrote: >There are many locations that do > > if (memory_was_allocated_by_vmalloc) >vfree(ptr); > else >kfree(ptr); > >but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory >using is_vmalloc_addr(). Unless callers have special reasons

Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread David Miller
From: Jan Kara Date: Mon, 9 Nov 2015 13:11:26 +0100 > You can add > > Acked-by: Jan Kara > > for the UDF and fs/xattr.c parts. Please do not quote and entire large patch just to give an ACK. Just quote the minimum necessary context, which is usually just the commit message. -- To unsubscribe

Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread Russell King - ARM Linux
On Mon, Nov 09, 2015 at 08:56:10PM +0900, Tetsuo Handa wrote: > There are many locations that do > > if (memory_was_allocated_by_vmalloc) > vfree(ptr); > else > kfree(ptr); > > but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory > using is_vmalloc_addr(). Unless cal

Re: [PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread Jan Kara
On Mon 09-11-15 20:56:10, Tetsuo Handa wrote: > There are many locations that do > > if (memory_was_allocated_by_vmalloc) > vfree(ptr); > else > kfree(ptr); > > but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory > using is_vmalloc_addr(). Unless callers have specia

[PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()

2015-11-09 Thread Tetsuo Handa
There are many locations that do if (memory_was_allocated_by_vmalloc) vfree(ptr); else kfree(ptr); but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory using is_vmalloc_addr(). Unless callers have special reasons, we can replace this branch with kvfree(). Please chec