mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "John L. Hammond" <john.hammond@intel.com>
To: <greg@kroah.com>, <andreas.dilger@intel.com>, <oleg.drokin@intel.com>
Cc: <linux-kernel@vger.kernel.org>,
	"John L. Hammond" <john.hammond@intel.com>
Subject: [PATCH 07/12] staging/lustre/mgc: inline mgc_cancel()
Date: Fri, 5 Sep 2014 15:08:13 -0500	[thread overview]
Message-ID: <1409947698-30781-8-git-send-email-john.hammond@intel.com> (raw)
In-Reply-To: <1409947698-30781-1-git-send-email-john.hammond@intel.com>

From: "John L. Hammond" <john.hammond@intel.com>

The function mgc_cancel() is never invoked as an OBD device method and
is only called directly from mgc_process_log() so remove it.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
---
 drivers/staging/lustre/lustre/mgc/mgc_request.c |   17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 970e91c..cb0e6f9 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -904,14 +904,6 @@ static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
 	return rc;
 }
 
-static int mgc_cancel(struct obd_export *exp, struct lov_stripe_md *md,
-		      __u32 mode, struct lustre_handle *lockh)
-{
-	ldlm_lock_decref(lockh, mode);
-
-	return 0;
-}
-
 static void mgc_notify_active(struct obd_device *unused)
 {
 	/* wakeup mgc_requeue_thread to requeue mgc lock */
@@ -1679,12 +1671,8 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld)
 	mutex_unlock(&cld->cld_lock);
 
 	/* Now drop the lock so MGS can revoke it */
-	if (!rcl) {
-		rcl = mgc_cancel(mgc->u.cli.cl_mgc_mgsexp, NULL,
-				 LCK_CR, &lockh);
-		if (rcl)
-			CERROR("Can't drop cfg lock: %d\n", rcl);
-	}
+	if (!rcl)
+		ldlm_lock_decref(&lockh, LCK_CR);
 
 	return rc;
 }
@@ -1814,7 +1802,6 @@ struct obd_ops mgc_obd_ops = {
 	.o_connect      = client_connect_import,
 	.o_disconnect   = client_disconnect_export,
 	/* .o_enqueue      = mgc_enqueue, */
-	.o_cancel       = mgc_cancel,
 	/* .o_iocontrol    = mgc_iocontrol, */
 	.o_set_info_async = mgc_set_info_async,
 	.o_get_info       = mgc_get_info,
-- 
1.7.9.5


  parent reply	other threads:[~2014-09-05 20:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 20:08 [PATCH 00/12] staging/lustre: yet more dead code removal John L. Hammond
2014-09-05 20:08 ` [PATCH 01/12] staging/lustre/lov: remove unused OBD methods John L. Hammond
2014-09-05 20:08 ` [PATCH 02/12] staging/lustre/osc: " John L. Hammond
2014-09-05 20:08 ` [PATCH 03/12] staging/lustre/osc: remove obsolete llog handling code John L. Hammond
2014-09-05 20:08 ` [PATCH 04/12] staging/lustre: remove obd_ost.h John L. Hammond
2014-09-05 20:08 ` [PATCH 05/12] staging/lustre/mdc: remove unused OBD methods John L. Hammond
2014-09-05 20:08 ` [PATCH 06/12] staging/lustre/mdc: inline llog methods John L. Hammond
2014-09-05 20:08 ` John L. Hammond [this message]
2014-09-05 20:08 ` [PATCH 08/12] staging/lustre: remove unused OBD methods John L. Hammond
2014-09-05 20:08 ` [PATCH 09/12] staging/lustre/mgc: remove server specific llog handling John L. Hammond
2014-09-05 20:08 ` [PATCH 10/12] staging/lustre/ptlrpc: remove sptlrpc_conf_target_get_rules() John L. Hammond
2014-09-05 20:08 ` [PATCH 11/12] staging/lustre/obdclass: remove llog_ioctl.c John L. Hammond
2014-09-05 20:08 ` [PATCH 12/12] staging/lustre/obdclass: remove local_storage.[ch] John L. Hammond

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=1409947698-30781-8-git-send-email-john.hammond@intel.com \
    --to=john.hammond@intel.com \
    --cc=andreas.dilger@intel.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome