drdb: Switch to kvfree_rcu() API
[platform/kernel/linux-starfive.git] / drivers / block / drbd / drbd_receiver.c
index f1da091..6762be5 100644 (file)
@@ -3750,8 +3750,7 @@ static int receive_protocol(struct drbd_connection *connection, struct packet_in
                drbd_info(connection, "peer data-integrity-alg: %s\n",
                          integrity_alg[0] ? integrity_alg : "(none)");
 
-       synchronize_rcu();
-       kfree(old_net_conf);
+       kvfree_rcu(old_net_conf);
        return 0;
 
 disconnect_rcu_unlock:
@@ -4119,8 +4118,7 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_info
 
                        rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf);
                        mutex_unlock(&connection->resource->conf_update);
-                       synchronize_rcu();
-                       kfree(old_disk_conf);
+                       kvfree_rcu(old_disk_conf);
 
                        drbd_info(device, "Peer sets u_size to %lu sectors (old: %lu)\n",
                                 (unsigned long)p_usize, (unsigned long)my_usize);