X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fost%2Fost_handler.c;h=cb520bb40ccf479dc586f3432c24e159a90d1fd2;hp=1ae73081830b3878fd02f0b46a6de99504978dc0;hb=e6ba48a08c9fe831b3f60985a72bb31b9806bb34;hpb=46314e29a24e677ed85c13f3aa72c7187383f14e diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 1ae7308..cb520bb 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -1605,6 +1605,11 @@ static int ost_rw_hpreq_lock_match(struct ptlrpc_request *req, end = (nb[ioo->ioo_bufcnt - 1].offset + nb[ioo->ioo_bufcnt - 1].len - 1) | ~CFS_PAGE_MASK; + LASSERT(lock->l_resource != NULL); + if (!osc_res_name_eq(ioo->ioo_id, ioo->ioo_gr, + &lock->l_resource->lr_name)) + RETURN(0); + if (!(lock->l_granted_mode & mode)) RETURN(0);