Whamcloud - gitweb
LU-14959 ldlm: Check return value of ldlm_resource_get() 38/44738/4
authorOleg Drokin <green@whamcloud.com>
Tue, 24 Aug 2021 03:44:45 +0000 (23:44 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 17 Sep 2021 14:06:55 +0000 (14:06 +0000)
commit3e0aa9ca6e0a9a6981b9a3ad5f556cd6554a6b5b
treef98232449f9d3ad57512d15f84b603406744f90d
parentb275ccd9787753b9cbf4368d8611c2ac94726e2e
LU-14959 ldlm: Check return value of ldlm_resource_get()

Fix the comment to properly indicate it returns ERR_PTR on
error and fix osc_req_attr_set() and mdc_get_lock_handle()
to actually check the return value before passing it on and
causing an unintended crash.

Change-Id: Ib85a62140a39744e85989c9a9c8aa2ed771d70d1
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44738
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
lustre/ldlm/ldlm_resource.c
lustre/mdc/mdc_dev.c
lustre/osc/osc_object.c