Whamcloud - gitweb
LU-6587 obdclass: use OBD_FREE_LARGE with OBD_ALLOC_LARGE 34/18034/4
authorAndreas Dilger <andreas.dilger@intel.com>
Mon, 18 Jan 2016 19:54:46 +0000 (12:54 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Feb 2016 15:07:03 +0000 (15:07 +0000)
The change to use is_vmalloc_addr() instead of checking the allocation
size was introduced in commit 919b85d796f8, which allows using trying
kmalloc() before vmalloc(), but the deprecation of OBD_FREE_LARGE()
should not have happened since this adds needless overhead.

Use OBD_FREE_LARGE() for memory allocated with OBD_ALLOC_LARGE() so
that we only need to check is_vmalloc_addr() in OBD_FREE_LARGE()
instead of every call to OBD_FREE().

Add comments to data structures using OBD_ALLOC_LARGE() memory so
that it is clear to the users that OBD_FREE_LARGE() must be used
when freeing that memory.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ief38142f6f777eec4ec0dae4ec64bfbf78b804ed
Reviewed-on: http://review.whamcloud.com/18034
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>

No differences found