In check_and_discard_cb(), subpage's index should be used to find if
there exists another lock to cover the same page.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Id8e1da89ef81fad4c7917360d591fc7bd1309a00
Reviewed-on: http://review.whamcloud.com/4673
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
struct cl_lock *except,
int pending, int canceld)
{
+ LASSERT(cl_object_header(obj) == cl_object_header(page->cp_obj));
return cl_lock_at_pgoff(env, obj, page->cp_index, except,
pending, canceld);
}
if (index >= info->clt_fn_index) {
struct cl_lock *tmp;
- /* refresh non-overlapped index */
- tmp = cl_lock_at_page(env, lock->cll_descr.cld_obj, page, lock,
- 1, 0);
+ /* refresh non-overlapped index */
+ tmp = cl_lock_at_pgoff(env, lock->cll_descr.cld_obj, index,
+ lock, 1, 0);
if (tmp != NULL) {
/* Cache the first-non-overlapped index so as to skip
* all pages within [index, clt_fn_index). This