-
Mr NeilBrown authored
lock->l_resource can (sometimes) change when the resource isn't locked. So dereferencing lock->l_resource and then locking the resource looks wrong. As lock_res_and_lock() returns the locked resource, this code can easily be more obviously correct by using that return value. Change-Id: Iced0bf1af4fa8ddedffa817e00f1c6a02b035d76 Signed-off-by: Mr NeilBrown <neilb@suse.de> Reviewed-on: https://review.whamcloud.com/35484 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
74f4393c