From 89b1c2fb99fee343fa9cace3e4a29cb02a272c7f Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 23 Jul 2019 21:06:45 +0000 Subject: [PATCH] scst: Remove a superfluous synchronize_rcu() call git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8473 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index abf9c1db3..97322c601 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -4547,8 +4547,11 @@ out_on_del: scst_cm_on_del_lun(acg_dev, false); out_free: - /* To do: verify whether this synchronize_rcu() call is necessary. */ - synchronize_rcu(); + /* + * synchronize_rcu() does not have to be called here because the + * tgt_devs that will be freed have never been on any of the + * sess->sess_tgt_dev_list[] lists. + */ list_for_each_entry_safe(tgt_dev, tt, &tmp_tgt_dev_list, extra_tgt_dev_list_entry) { scst_free_tgt_dev(tgt_dev);