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

Dilger, Andreas andreas.dilger at intel.com
Mon Nov 9 21:41:04 CET 2015

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 2015/11/09, 04:56, "Tetsuo Handa" <penguin-kernel at I-love.SAKURA.ne.jp>
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, we can
>replace this branch with kvfree(). Please check and reply if you found
>problems.
>
>Signed-off-by: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>
>Acked-by: Michal Hocko <mhocko at suse.com>

For Lustre part:
Reviewed-by: Andreas Dilger <andreas.dilger at intel.com>

Cheers, Andreas
-- 
Andreas Dilger

Lustre Principal Engineer
Intel High Performance Data Division





More information about the drbd-user mailing list