Whamcloud - gitweb
LU-4524 ldlm: improve ldlm_lock_create() return value 04/9004/8
authorEmoly Liu <emoly.liu@intel.com>
Mon, 9 Jun 2014 03:52:50 +0000 (11:52 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 16 Jun 2014 01:59:13 +0000 (01:59 +0000)
commit997a9f659e01b807997641a321241369a27c4293
treee01cb65ba17ae119b77e6bf1961b4fa3ecbab739
parentecbba77d0d8f1446cb1d712815b88985abb71fcb
LU-4524 ldlm: improve ldlm_lock_create() return value

ldlm_lock_create() and ldlm_resource_get() always return NULL as
error reporting and "NULL" is interpretted as ENOMEM incorrectly
sometimes.
This patch fixes this problem by using ERR_PTR() rather than NULL.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ifa2e9494406617c9d29c0463cd9fcffba36cc5ae
Reviewed-on: http://review.whamcloud.com/9004
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
12 files changed:
lustre/ldlm/ldlm_flock.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/ldlm/ldlm_resource.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_io.c
lustre/ofd/ofd_obd.c
lustre/osc/osc_request.c
lustre/quota/qmt_lock.c