All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@inktank.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH 6/7] rbd: drop "object_name" from rbd_req_sync_notify_ack()
Date: Thu, 26 Jul 2012 13:57:49 -0500	[thread overview]
Message-ID: <5011932D.1060005@inktank.com> (raw)
In-Reply-To: <50119076.1030307@inktank.com>

rbd_req_sync_notify_ack() only ever uses rbd_dev->header_name as the
value of its "object_name" parameter, and that value is available
within the function already.  So get rid of the parameter.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 drivers/block/rbd.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index b9aa377..48a7927 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1185,8 +1185,7 @@ static int rbd_req_sync_read(struct rbd_device
*rbd_dev,
  */
 static int rbd_req_sync_notify_ack(struct rbd_device *rbd_dev,
 				   u64 ver,
-				   u64 notify_id,
-				   const char *object_name)
+				   u64 notify_id)
 {
 	struct ceph_osd_req_op *ops;
 	int ret;
@@ -1200,7 +1199,7 @@ static int rbd_req_sync_notify_ack(struct
rbd_device *rbd_dev,
 	ops[0].watch.flag = 0;

 	ret = rbd_do_request(NULL, rbd_dev, NULL, CEPH_NOSNAP,
-			  object_name, 0, 0, NULL,
+			  rbd_dev->header_name, 0, 0, NULL,
 			  NULL, 0,
 			  CEPH_OSD_FLAG_READ,
 			  ops,
@@ -1230,7 +1229,7 @@ static void rbd_watch_cb(u64 ver, u64 notify_id,
u8 opcode, void *data)
 		pr_warning(RBD_DRV_NAME "%d got notification but failed to "
 			   " update snaps: %d\n", rbd_dev->major, rc);

-	rbd_req_sync_notify_ack(rbd_dev, hver, notify_id, rbd_dev->header_name);
+	rbd_req_sync_notify_ack(rbd_dev, hver, notify_id);
 }

 /*
-- 
1.7.9.5


  parent reply	other threads:[~2012-07-26 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 18:46 [PATCH 0/7] rbd: drop unused parameters from functions Alex Elder
2012-07-26 18:57 ` [PATCH 1/7] rbd: snapc is unused in rbd_req_sync_read() Alex Elder
2012-07-26 18:57 ` [PATCH 2/7] rbd: drop rbd_header_from_disk() gfp_flags parameter Alex Elder
2012-07-26 18:57 ` [PATCH 3/7] rbd: drop rbd_dev parameter in snap functions Alex Elder
2012-07-26 18:57 ` [PATCH 4/7] rbd: drop "object_name" from rbd_req_sync_watch() Alex Elder
2012-07-26 18:57 ` [PATCH 5/7] rbd: drop "object_name" from rbd_req_sync_notify() Alex Elder
2012-07-26 18:57 ` Alex Elder [this message]
2012-07-26 18:57 ` [PATCH 7/7] rbd: drop "object_name" from rbd_req_sync_unwatch() Alex Elder
2012-07-26 19:35 ` [PATCH 0/7] rbd: drop unused parameters from functions Josh Durgin

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=5011932D.1060005@inktank.com \
    --to=elder@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.