Skip to content

Commit 18f2cf2

Browse files
committed
Merge branch 'for-7.1/block' into for-next
* for-7.1/block: drbd: Balance RCU calls in drbd_adm_dump_devices()
2 parents d61665c + 2b31e86 commit 18f2cf2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/block/drbd/drbd_nl.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,8 +3443,10 @@ int drbd_adm_dump_devices(struct sk_buff *skb, struct netlink_callback *cb)
34433443
if (resource_filter) {
34443444
retcode = ERR_RES_NOT_KNOWN;
34453445
resource = drbd_find_resource(nla_data(resource_filter));
3446-
if (!resource)
3446+
if (!resource) {
3447+
rcu_read_lock();
34473448
goto put_result;
3449+
}
34483450
cb->args[0] = (long)resource;
34493451
}
34503452
}
@@ -3693,8 +3695,10 @@ int drbd_adm_dump_peer_devices(struct sk_buff *skb, struct netlink_callback *cb)
36933695
if (resource_filter) {
36943696
retcode = ERR_RES_NOT_KNOWN;
36953697
resource = drbd_find_resource(nla_data(resource_filter));
3696-
if (!resource)
3698+
if (!resource) {
3699+
rcu_read_lock();
36973700
goto put_result;
3701+
}
36983702
}
36993703
cb->args[0] = (long)resource;
37003704
}

0 commit comments

Comments
 (0)