Setting OBD_FAIL_OSC_MATCH would cause an infinite call and return loop between osc_dlmlock_at_pgoff() and osc_match_base(). This fail loc is only set in sanity.sh test_62() which is never called.
The OBD_FAIL_CHECK(OBD_FAIL_OSC_MATCH)) test in osc_match_base() should be removed along with test_62() in sanity.sh.
Once this is done the return type of osc_match_base() should be changed from int to enum ldlm_mode.
More generally, since osc_lock_match() is only called osc_dlmlock_at_pgoff() there could be several simplifications by just eliminating the former function.