From: NeilBrown <neilb@suse.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
James Simmons <jsimmons@infradead.org>,
Andreas Dilger <andreas.dilger@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: lustre-devel@lists.lustre.org, linux-kernel@vger.kernel.org
Subject: [PATCH 9/9] staging: lustre: ldlm: remove unused field 'fwd_generation'
Date: Mon, 23 Oct 2017 11:53:49 +1100 [thread overview]
Message-ID: <150872002986.3340.15607846693582678949.stgit@noble> (raw)
In-Reply-To: <150871988297.3340.4522589460981284121.stgit@noble>
With this field gone, we don't need local variables 'imp' or 'obd'
any more.
Signed-off-by: NeilBrown <neilb@suse.com>
---
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. */
next prev parent reply other threads:[~2017-10-23 0:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 0:53 [PATCH 0/9] Assorted cleanups for staging/.../lustre/ldlm/ldlm_flock.c NeilBrown
2017-10-23 0:53 ` [PATCH 2/9] staging: lustre: ldlm: remove unused 'work_list' arg from ldlm_process_flock_lock() NeilBrown
2017-10-27 9:09 ` Dilger, Andreas
2017-10-23 0:53 ` [PATCH 1/9] staging: lustre: ldlm: remove 'first_enq' " NeilBrown
2017-10-27 9:08 ` Dilger, Andreas
2017-10-23 0:53 ` [PATCH 4/9] staging: lustre: ldlm: remove 'flags' " NeilBrown
2017-10-27 9:19 ` Dilger, Andreas
2017-10-23 0:53 ` [PATCH 6/9] staging: lustre: ldlm: remove 'flags' arg from ldlm_flock_destroy() NeilBrown
2017-10-27 9:23 ` Dilger, Andreas
2017-10-23 0:53 ` NeilBrown [this message]
2017-10-27 9:39 ` [lustre-devel] [PATCH 9/9] staging: lustre: ldlm: remove unused field 'fwd_generation' Dilger, Andreas
2017-10-27 11:10 ` NeilBrown
2017-10-23 0:53 ` [PATCH 5/9] staging: lustre: ldlm: remove unused 'overlaps' variable NeilBrown
2017-10-27 9:20 ` Dilger, Andreas
2017-10-23 0:53 ` [PATCH 3/9] staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock() NeilBrown
2017-10-27 9:11 ` Dilger, Andreas
2017-10-23 0:53 ` [PATCH 8/9] staging: lustre: ldlm: remove unnecessary 'ownlocks' variable NeilBrown
2017-10-27 9:33 ` Dilger, Andreas
2017-10-23 0:53 ` [PATCH 7/9] staging: lustre: ldlm: tidy list walking in ldlm_flock() NeilBrown
2017-10-27 9:32 ` Dilger, Andreas
2017-10-24 22:20 ` [PATCH 0/9] Assorted cleanups for staging/.../lustre/ldlm/ldlm_flock.c James Simmons
2017-10-25 21:55 ` 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=150872002986.3340.15607846693582678949.stgit@noble \
--to=neilb@suse.com \
--cc=andreas.dilger@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jsimmons@infradead.org \
--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®