From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752218AbdJ0JId convert rfc822-to-8bit (ORCPT ); Fri, 27 Oct 2017 05:08:33 -0400 Received: from mga02.intel.com ([134.134.136.20]:25305 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbdJ0JIb (ORCPT ); Fri, 27 Oct 2017 05:08:31 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,304,1505804400"; d="scan'208";a="1235995325" From: "Dilger, Andreas" To: NeilBrown CC: "Drokin, Oleg" , James Simmons , Greg Kroah-Hartman , "lustre-devel@lists.lustre.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/9] staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock() Thread-Topic: [PATCH 1/9] staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock() Thread-Index: AQHTS5mU7cE6GfdbKkaZQhFjGxkmQKL35HSA Date: Fri, 27 Oct 2017 09:08:29 +0000 Message-ID: References: <150871988297.3340.4522589460981284121.stgit@noble> <150872002958.3340.14294625301256962751.stgit@noble> In-Reply-To: <150872002958.3340.14294625301256962751.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: <0994C2DC4CC96742AF3D16B9D865FFCE@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: > > it is only ever set to '1', so we can just assume that and remove the code. > > Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger > --- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index cb826e9e840e..f719dc05e1ea 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -121,15 +121,9 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) > * It is also responsible for splitting a lock if a portion of the lock > * is released. > * > - * If \a first_enq is 0 (ie, called from ldlm_reprocess_queue): > - * - blocking ASTs have already been sent > - * > - * If \a first_enq is 1 (ie, called from ldlm_lock_enqueue): > - * - blocking ASTs have not been sent yet, so list of conflicting locks > - * would be collected and ASTs sent. > */ > static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > - int first_enq, enum ldlm_error *err, > + enum ldlm_error *err, > struct list_head *work_list) > { > struct ldlm_resource *res = req->l_resource; > @@ -197,11 +191,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, > if (!ldlm_flocks_overlap(lock, req)) > continue; > > - if (!first_enq) { > - reprocess_failed = 1; > - continue; > - } > - > if (*flags & LDLM_FL_BLOCK_NOWAIT) { > ldlm_flock_destroy(req, mode, *flags); > *err = -EAGAIN; > @@ -605,7 +594,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) > /* We need to reprocess the lock to do merges or splits > * with existing locks owned by this process. > */ > - ldlm_process_flock_lock(lock, &noreproc, 1, &err, NULL); > + ldlm_process_flock_lock(lock, &noreproc, &err, NULL); > } > unlock_res_and_lock(lock); > return rc; > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation