staging: lustre: 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> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4524 Reviewed-on: http://review.whamcloud.com/9004Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment