mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	Greg Kroah-Hartman <greg@kroah.com>,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [PATCH 04/12] staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock()
Date: Wed, 19 Jul 2017 09:26:47 +1000	[thread overview]
Message-ID: <150042040748.20736.16657316764497795112.stgit@noble> (raw)
In-Reply-To: <150041997277.20736.17112251996623587423.stgit@noble>

it is only ever set to '1', so we can just assume that and remove the code.

Signed-off-by: NeilBrown <neilb@suse.com>
---
 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 b7f28b39c7b3..8ba3eaf49c65 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;

  reply	other threads:[~2017-07-18 23:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 23:26 [PATCH 00/12] Assorted lustre fixes and improvements NeilBrown
2017-07-18 23:26 ` NeilBrown [this message]
2017-07-18 23:26 ` [PATCH 03/12] staging: lustre: llite: fix various issues with ll_splice_alias NeilBrown
2017-07-19  2:51   ` Oleg Drokin
2017-07-19  4:33     ` NeilBrown
2017-07-19  6:18       ` Oleg Drokin
2017-07-18 23:26 ` [PATCH 05/12] staging: lustre: ldlm: remove unused 'work_list' arg from ldlm_process_flock_lock() NeilBrown
2017-07-18 23:26 ` [PATCH 02/12] staging: lustre: llite: fix incorrect DCACHE_DISCONNECTED test NeilBrown
2017-07-18 23:26 ` [PATCH 01/12] staging: lustre: fix minor typos in comments NeilBrown
2017-07-19  8:29   ` Greg KH
2017-08-02  3:26     ` [PATCH] " NeilBrown
2017-08-03 17:29       ` [lustre-devel] " James Simmons
2017-07-18 23:26 ` [PATCH 07/12] staging: lustre: ldlm: remove 'flags' arg from ldlm_process_flock_lock() NeilBrown
2017-07-18 23:26 ` [PATCH 09/12] staging: lustre: ldlm: remove 'flags' arg from ldlm_flock_destroy() NeilBrown
2017-07-18 23:26 ` [PATCH 08/12] staging: lustre: ldlm: remove unused 'overlaps' variable NeilBrown
2017-07-18 23:26 ` [PATCH 10/12] staging: lustre: ldlm: tidy list walking in ldlm_flock() NeilBrown
     [not found]   ` <BN6PR1101MB2132359E48C9904D3E305EE7CBA60@BN6PR1101MB2132.namprd11.prod.outlook.com>
2017-07-19  4:36     ` [lustre-devel] " NeilBrown
2017-07-18 23:26 ` [PATCH 06/12] staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock() NeilBrown
2017-07-18 23:26 ` [PATCH 12/12] staging: lustre: ldlm: remove unused field 'fwd_generation' NeilBrown
2017-07-18 23:26 ` [PATCH 11/12] staging: lustre: ldlm: remove unnecessary 'ownlocks' variable NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150042040748.20736.16657316764497795112.stgit@noble \
    --to=neilb@suse.com \
    --cc=andreas.dilger@intel.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®