summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShang XiaoJing <shangxiaojing@huawei.com>2022-09-20 21:51:45 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-24 12:55:22 +0200
commit74adc1f005e6c28f9019ae49cb5f2796e532f25e (patch)
treea28b8f17a81a3800742e53fbc0415ba8cb22d540 /drivers
parent9634b371b66a270821ed8d4d224ef19e9b842507 (diff)
downloadlinux-74adc1f005e6c28f9019ae49cb5f2796e532f25e.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/fwserial/fwserial.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index e8fa7f53cd5e..3134b13081af 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -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);
}
/**