Timestamp:
01/22/16 23:11:02 (8 years ago)
Author:
Tetsuo Handa <penguin-kernel@…>
Branches:
5, master
Children:
1e6d56e
Parents:
410dd26
git-author:
Tetsuo Handa <penguin-kernel@…> (01/22/16 23:11:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/16/18 05:22:12)
Message:

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

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

Signed-off-by: Tetsuo Handa <penguin-kernel@…>
Acked-by: Michal Hocko <mhocko@…>
Acked-by: Jan Kara <jack@…>
Acked-by: Russell King <rmk+kernel@…>
Reviewed-by: Andreas Dilger <andreas.dilger@…>
Acked-by: "Rafael J. Wysocki" <rjw@…>
Acked-by: David Rientjes <rientjes@…>
Cc: "Luck, Tony" <tony.luck@…>
Cc: Oleg Drokin <oleg.drokin@…>
Cc: Boris Petkov <bp@…>
Signed-off-by: Andrew Morton <akpm@…>
Signed-off-by: Linus Torvalds <torvalds@…>

(No files)

Note: See TracChangeset for help on using the changeset viewer.