]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drbd: Remove pointless check
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 29 Oct 2014 16:19:44 +0000 (17:19 +0100)
committerJens Axboe <axboe@fb.com>
Wed, 25 Nov 2015 16:21:59 +0000 (09:21 -0700)
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>
drivers/block/drbd/drbd_nl.c

index e80cbefbc2b548761fe5f531773b1022a21353eb..a1a01ccb73997905228637a22bbde7d3cf45929a 100644 (file)
@@ -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 */