Commit 74adc1f0 authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Greg Kroah-Hartman
Browse files

staging: fwserial: Switch to kfree_rcu() API



Instead of invoking a synchronize_rcu() to free a pointer after a grace
period, we can directly make use of a new API that does the same but in
a more efficient way.

Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220920135145.1387-1-shangxiaojing@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9634b371
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2116,8 +2116,7 @@ static void fwserial_remove_peer(struct fwtty_peer *peer)
	if (port)
		fwserial_release_port(port, true);

	synchronize_rcu();
	kfree(peer);
	kfree_rcu(peer);
}

/**