Whamcloud - gitweb
LU-11719 ldlm: Adjust search_* functions 99/40399/2
authorPatrick Farrell <paf@cray.com>
Mon, 3 Dec 2018 16:36:08 +0000 (10:36 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 3 Nov 2020 03:17:18 +0000 (03:17 +0000)
commit4ddd1965a6a8c5bbdc04ac26ace09ba6e32bee34
tree924a28f513c5a86fd4447727b7e73132eb15d444
parentaf49e96b95909f470757890f34da760b8af3c9a8
LU-11719 ldlm: Adjust search_* functions

The search_itree and search_queue functions should both
return either a pointer to a found lock or NULL.

Currently, search_itree just returns the contents of
data->lmd_lock, whether or not a lock was found.

search_queue will do the same under certain cirumstances.

Zero lmd_lock in both search_* functions, and also stop
searching in search_itree once a lock is found.

cray-bug-id: LUS-6783
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ie231166756e60c228370f8f1a019ccfe14dfda6a
Reviewed-on: https://review.whamcloud.com/33754
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40399
Tested-by: jenkins <devops@whamcloud.com>
lustre/ldlm/ldlm_lock.c
lustre/osc/osc_lock.c