tree wide: use kvfree() than conditional kfree()/vfree()

There are many locations that do

  if (memory_was_allocated_by_vmalloc)

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 check and reply if you found

Signed-off-by: Tetsuo Handa <>
Acked-by: Michal Hocko <>
Acked-by: Jan Kara <>
Acked-by: Russell King <>
Reviewed-by: Andreas Dilger <>
Acked-by: "Rafael J. Wysocki" <>
Acked-by: David Rientjes <>
Cc: "Luck, Tony" <>
Cc: Oleg Drokin <>
Cc: Boris Petkov <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
17 files changed