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: Shang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220920135145.1387-1-shangxiaojing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Shang XiaoJing 2022-09-20 21:51:45 +08:00 committed by Greg Kroah-Hartman
parent 9634b371b6
commit 74adc1f005
1 changed files with 1 additions and 2 deletions

View File

@ -2116,8 +2116,7 @@ static void fwserial_remove_peer(struct fwtty_peer *peer)
if (port) if (port)
fwserial_release_port(port, true); fwserial_release_port(port, true);
synchronize_rcu(); kfree_rcu(peer);
kfree(peer);
} }
/** /**