Whamcloud - gitweb
LU-6997 mdt: enqueue nonblocking locks in migration
[fs/lustre-release.git] / lustre / osp / osp_md_object.c
index af49456..65879d5 100644 (file)
@@ -898,6 +898,9 @@ static int osp_md_object_lock(const struct lu_env *env,
        if (mode > 0)
                return ELDLM_OK;
 
+       if (einfo->ei_nonblock)
+               flags |= LDLM_FL_BLOCK_NOWAIT;
+
        req = ldlm_enqueue_pack(osp->opd_exp, 0);
        if (IS_ERR(req))
                RETURN(PTR_ERR(req));