]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
revocable: Remove redundant synchronize_srcu() call
authorTzung-Bi Shih <tzungbi@kernel.org>
Wed, 21 Jan 2026 04:02:04 +0000 (04:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jan 2026 13:17:44 +0000 (14:17 +0100)
When allocating a revocable provider via revocable_provider_alloc(),
there is no revocable consumers (i.e., RCU readers) yet.  Remove the
redundant synchronize_srcu() call to save cycles.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260121040204.2699886-1-tzungbi@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/revocable.c

index f6cece275aac49158ff577b9e5dae9b6666139c4..b068e18a847d965e6ce82a461f5dbff15ed5d44c 100644 (file)
@@ -99,7 +99,6 @@ struct revocable_provider *revocable_provider_alloc(void *res)
 
        init_srcu_struct(&rp->srcu);
        rcu_assign_pointer(rp->res, res);
-       synchronize_srcu(&rp->srcu);
        kref_init(&rp->kref);
 
        return rp;