mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 03/19] drbd: Get rid of some first_peer_device() calls
Date: Thu, 30 Jul 2015 13:21:38 +0200	[thread overview]
Message-ID: <1438255314-14877-4-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1438255314-14877-1-git-send-email-philipp.reisner@linbit.com>

From: Andreas Gruenbacher <agruen@linbit.com>

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
 drivers/block/drbd/drbd_receiver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index c097909..e594391 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1379,7 +1379,7 @@ int drbd_submit_peer_request(struct drbd_device *device,
 	if (peer_req->flags & EE_IS_TRIM_USE_ZEROOUT) {
 		/* wait for all pending IO completions, before we start
 		 * zeroing things out. */
-		conn_wait_active_ee_empty(first_peer_device(device)->connection);
+		conn_wait_active_ee_empty(peer_req->peer_device->connection);
 		/* add it to the active list now,
 		 * so we can find it to present it in debugfs */
 		peer_req->submit_jif = jiffies;
@@ -1965,7 +1965,7 @@ static int e_end_block(struct drbd_work *w, int cancel)
 	} else
 		D_ASSERT(device, drbd_interval_empty(&peer_req->i));
 
-	drbd_may_finish_epoch(first_peer_device(device)->connection, peer_req->epoch, EV_PUT + (cancel ? EV_CLEANUP : 0));
+	drbd_may_finish_epoch(peer_device->connection, peer_req->epoch, EV_PUT + (cancel ? EV_CLEANUP : 0));
 
 	return err;
 }
@@ -2097,7 +2097,7 @@ static int wait_for_and_update_peer_seq(struct drbd_peer_device *peer_device, co
 		}
 
 		rcu_read_lock();
-		tp = rcu_dereference(first_peer_device(device)->connection->net_conf)->two_primaries;
+		tp = rcu_dereference(peer_device->connection->net_conf)->two_primaries;
 		rcu_read_unlock();
 
 		if (!tp)
@@ -2363,7 +2363,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
 	if (dp_flags & DP_SEND_RECEIVE_ACK) {
 		/* I really don't like it that the receiver thread
 		 * sends on the msock, but anyways */
-		drbd_send_ack(first_peer_device(device), P_RECV_ACK, peer_req);
+		drbd_send_ack(peer_device, P_RECV_ACK, peer_req);
 	}
 
 	if (tp) {
-- 
1.9.1


  parent reply	other threads:[~2015-07-30 11:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 11:21 [PATCH 00/19] RFC DRBD updates for the 4.3 merge window Philipp Reisner
2015-07-30 11:21 ` [PATCH 01/19] drbd: Remove pointless check Philipp Reisner
2015-07-30 11:21 ` [PATCH 02/19] drbd: De-inline drbd_should_do_remote() and drbd_should_send_out_of_sync() Philipp Reisner
2015-07-30 11:21 ` Philipp Reisner [this message]
2015-07-30 11:21 ` [PATCH 04/19] drbd: Move enum write_ordering_e to drbd.h Philipp Reisner
2015-07-30 11:21 ` [PATCH 05/19] drbd: drbd_adm_attach(): Add missing drbd_resync_after_changed() Philipp Reisner
2015-07-30 11:21 ` [PATCH 06/19] drbd: Fix locking across all resources Philipp Reisner
2015-07-30 11:21 ` [PATCH 07/19] drbd: Backport the "events2" command Philipp Reisner
2015-07-30 11:21 ` [PATCH 08/19] drbd: Backport the "status" command Philipp Reisner
2015-07-30 11:21 ` [PATCH 09/19] drbd: Deletion of an unnecessary check before the function call "lc_destroy" Philipp Reisner
2015-07-30 11:21 ` [PATCH 10/19] drbd: Replace 0 with the more meaningful GFP_NOWAIT Philipp Reisner
2015-07-30 11:21 ` [PATCH 11/19] drbd: Fix spurious disk-timeout Philipp Reisner
2015-07-30 11:21 ` [PATCH 12/19] drbd: drop remnants of connector -- we don't use it anymore in drbd 8.4 Philipp Reisner
2015-07-30 11:21 ` [PATCH 13/19] drbd: drbdsetup detach of an unresponsive local disk should not block IO "forever" Philipp Reisner
2015-07-30 11:21 ` [PATCH 14/19] drbd: also bump UUIDs if a diskless primary connects Philipp Reisner
2015-07-30 11:21 ` [PATCH 15/19] drbd: add comment why we want to first call local-io-error, then send state Philipp Reisner
2015-07-30 11:21 ` [PATCH 16/19] drbd: drbd_panic_after_delayed_completion_of_aborted_request() Philipp Reisner
2015-07-30 11:21 ` [PATCH 17/19] drbd: improve network timeout detection Philipp Reisner
2015-07-30 11:21 ` [PATCH 18/19] drbd: fix NULL deref in remember_new_state Philipp Reisner
2015-07-30 11:21 ` [PATCH 19/19] drbd: fix refcount error during detach of an already failed disk Philipp Reisner

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=1438255314-14877-4-git-send-email-philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=axboe@kernel.dk \
    --cc=drbd-dev@lists.linbit.com \
    --cc=linux-kernel@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 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®