Whamcloud - gitweb
LU-14959 ldlm: Check return value of ldlm_resource_get()
authorOleg Drokin <green@whamcloud.com>
Tue, 24 Aug 2021 03:44:45 +0000 (23:44 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 14 Jan 2022 06:08:26 +0000 (06:08 +0000)
commita108d001ee40e092f9c60dce13f3d5a0881dcdfe
treeec37aa09e9fef68db25077e21357b1460661e3c8
parent627e587057753f0d37cbe73727fac1b846bdb9ce
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.

Lustre-change: https://review.whamcloud.com/44738
Lustre-commit: 3e0aa9ca6e0a9a6981b9a3ad5f556cd6554a6b5b

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