From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752363AbdJ0JjF convert rfc822-to-8bit (ORCPT ); Fri, 27 Oct 2017 05:39:05 -0400 Received: from mga02.intel.com ([134.134.136.20]:3423 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058AbdJ0JjD (ORCPT ); Fri, 27 Oct 2017 05:39:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,304,1505804400"; d="scan'208";a="1030061054" From: "Dilger, Andreas" To: NeilBrown CC: "Drokin, Oleg" , James Simmons , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "lustre-devel@lists.lustre.org" Subject: Re: [lustre-devel] [PATCH 9/9] staging: lustre: ldlm: remove unused field 'fwd_generation' Thread-Topic: [lustre-devel] [PATCH 9/9] staging: lustre: ldlm: remove unused field 'fwd_generation' Thread-Index: AQHTS5m4yBUwy5eykkaiUnmfRzhg2qL37PyA Date: Fri, 27 Oct 2017 09:39:01 +0000 Message-ID: References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002986.3340.15607846693582678949.stgit@noble> In-Reply-To: <150872002986.3340.15607846693582678949.stgit@noble> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.7.56] Content-Type: text/plain; charset="us-ascii" Content-ID: <99A4AA6B2AE6E6499220037AAFDB93C1@intel.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Oct 22, 2017, at 18:53, NeilBrown wrote: > > With this field gone, we don't need local variables 'imp' or 'obd' > any more. > > Signed-off-by: NeilBrown Thanks for the patches. Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 21 +++------------------ > 1 file changed, 3 insertions(+), 18 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 774d8667769a..9c0e9cd00000 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -311,7 +311,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > > struct ldlm_flock_wait_data { > struct ldlm_lock *fwd_lock; > - int fwd_generation; > }; > > static void > @@ -342,11 +341,9 @@ int > ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > { > struct file_lock *getlk = lock->l_ast_data; > - struct obd_device *obd; > - struct obd_import *imp = NULL; > - struct ldlm_flock_wait_data fwd; > - struct l_wait_info lwi; > - int rc = 0; > + struct ldlm_flock_wait_data fwd; > + struct l_wait_info lwi; > + int rc = 0; > > OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4); > if (OBD_FAIL_PRECHECK(OBD_FAIL_LDLM_CP_CB_WAIT3)) { > @@ -374,18 +371,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > > LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, sleeping"); > fwd.fwd_lock = lock; > - obd = class_exp2obd(lock->l_conn_export); > - > - /* if this is a local lock, there is no import */ > - if (obd) > - imp = obd->u.cli.cl_import; > - > - if (imp) { > - spin_lock(&imp->imp_lock); > - fwd.fwd_generation = imp->imp_generation; > - spin_unlock(&imp->imp_lock); > - } > - > lwi = LWI_TIMEOUT_INTR(0, NULL, ldlm_flock_interrupted_wait, &fwd); > > /* Go to sleep until the lock is granted. */ > > > _______________________________________________ > lustre-devel mailing list > lustre-devel@lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation