From: green Date: Tue, 6 Dec 2005 10:35:59 +0000 (+0000) Subject: b=9879 X-Git-Tag: v1_7_100~1^103~4^2~201 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4352364ff34a5f6753722b3efe4a85a0a5921462;p=fs%2Flustre-release.git b=9879 Return error to client if it requests inode bits locks and we believe it does not support such locks. --- diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 846feee..80d55f0 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -709,6 +709,13 @@ int ldlm_handle_enqueue(struct ptlrpc_request *req, GOTO(out, rc = -EFAULT); } + if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS) && + dlm_req->lock_desc.l_resource.lr_type == LDLM_IBITS) { + DEBUG_REQ(D_ERROR, req, "Ibits lock request from unaware " + "client?\n"); + GOTO(out, rc = -EPROTO); + } + /* INODEBITS_INTEROP: Perform conversion from plain lock to * inodebits lock if client does not support them. */