Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752059AbcKGByB (ORCPT ); Sun, 6 Nov 2016 20:54:01 -0500 Received: from casper.infradead.org ([85.118.1.10]:56534 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751314AbcKGBx4 (ORCPT ); Sun, 6 Nov 2016 20:53:56 -0500 Date: Mon, 7 Nov 2016 01:53:41 +0000 (GMT) From: James Simmons To: Oleg Drokin cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 07/14] staging/lustre/ldlm: Reinstate ldlm_enqueue_pack() In-Reply-To: <1478136304-867780-8-git-send-email-green@linuxhacker.ru> Message-ID: References: <1478136304-867780-1-git-send-email-green@linuxhacker.ru> <1478136304-867780-8-git-send-email-green@linuxhacker.ru> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161107_015342_149283_B1C683C6 X-CRM114-Status: GOOD ( 12.28 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1453 Lines: 48 > The function becomes used again with the next patch, so bring it back > from dead, only this time make it static. Reviewed-by: James Simmons > Reverts: bf2a033360f7 ("staging/lustre/ldlm: Remove unused ldlm_enqueue_pack()") > Signed-off-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > index 6e704c7..1b9ae77 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > @@ -657,6 +657,27 @@ int ldlm_prep_enqueue_req(struct obd_export *exp, struct ptlrpc_request *req, > } > EXPORT_SYMBOL(ldlm_prep_enqueue_req); > > +static struct ptlrpc_request *ldlm_enqueue_pack(struct obd_export *exp, > + int lvb_len) > +{ > + struct ptlrpc_request *req; > + int rc; > + > + req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_LDLM_ENQUEUE); > + if (!req) > + return ERR_PTR(-ENOMEM); > + > + rc = ldlm_prep_enqueue_req(exp, req, NULL, 0); > + if (rc) { > + ptlrpc_request_free(req); > + return ERR_PTR(rc); > + } > + > + req_capsule_set_size(&req->rq_pill, &RMF_DLM_LVB, RCL_SERVER, lvb_len); > + ptlrpc_request_set_replen(req); > + return req; > +} > + > /** > * Client-side lock enqueue. > * > -- > 2.7.4 > >