Skip to content

Commit

Permalink
drbd: Remove pointless check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Reisner authored and Jens Axboe committed Nov 25, 2015
1 parent bc2c049 commit 3b8a44f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 3b8a44f

Please sign in to comment.