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)
commit0b1ad400c8f64575292a7ff54a8ce872a124b19e
treec072f41dad8559bb61380b40dcd550a198d3dbd4
parentd96c38aa85d80f5e0630c28d242f8279987c8d5e
LU-6587 obdclass: use OBD_FREE_LARGE with OBD_ALLOC_LARGE

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>
27 files changed:
contrib/scripts/checkpatch.pl
lustre/include/lu_target.h
lustre/include/lustre_dlm.h
lustre/include/lustre_log.h
lustre/include/lustre_net.h
lustre/include/lustre_update.h
lustre/include/obd_support.h
lustre/lfsck/lfsck_internal.h
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/rw26.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_ea.c
lustre/lov/lov_io.c
lustre/lov/lov_object.c
lustre/mdt/mdt_internal.h
lustre/obdecho/echo_client.c
lustre/osp/osp_internal.h
lustre/osp/osp_trans.c
lustre/ptlrpc/client.c
lustre/ptlrpc/sec_bulk.c
lustre/ptlrpc/sec_null.c
lustre/ptlrpc/sec_plain.c
lustre/ptlrpc/service.c
lustre/target/update_recovery.c