summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2014-10-29 17:19:44 +0100
committerJens Axboe <axboe@fb.com>2015-11-25 09:21:59 -0700
commit3b8a44f8edfd695f3bf63e0371f5b622028e560a (patch)
tree8f4959f4f7754ee2c4b677e3f7617b66c7923403
parentbc2c049d081ee6c2bf4809555c0c9f64a9a15e75 (diff)
downloadop-kernel-dev-3b8a44f8edfd695f3bf63e0371f5b622028e560a.zip
op-kernel-dev-3b8a44f8edfd695f3bf63e0371f5b622028e560a.tar.gz
drbd: Remove pointless check
In drbd-8.4 there is always a single connection per resource, and there is always exactly one peer_device for a device. peer_device can not be NULL here. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/block/drbd/drbd_nl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index e80cbef..a1a01cc 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -1478,7 +1478,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
device = adm_ctx.device;
mutex_lock(&adm_ctx.resource->adm_mutex);
peer_device = first_peer_device(device);
- connection = peer_device ? peer_device->connection : NULL;
+ connection = peer_device->connection;
conn_reconfig_start(connection);
/* if you want to reconfigure, please tear down first */
OpenPOWER on IntegriCloud