From: "Jan Beulich" Subject: [PATCH] Re: xenstore notifier: atomic or blocking? Date: Fri, 26 Oct 2007 16:47:02 +0100 Message-ID: <47222816.76E4.0078.0@novell.com> References: <47173AC9.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org There doesn't appear to be any need for it to be atomic. As usual, written and tested against 2.6.23 and made apply against 2.6.18 without further testing. Signed-off-by: Jan Beulich Index: head-2007-10-23/drivers/xen/xenbus/xenbus_probe.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-10-23.orig/drivers/xen/xenbus/xenbus_probe.c 2007-10-25 = 15:08:03.000000000 +0200 +++ head-2007-10-23/drivers/xen/xenbus/xenbus_probe.c 2007-10-25 = 15:08:43.000000000 +0200 @@ -69,7 +69,7 @@ static unsigned long xen_store_mfn; =20 extern struct mutex xenwatch_mutex; =20 -static ATOMIC_NOTIFIER_HEAD(xenstore_chain); +static BLOCKING_NOTIFIER_HEAD(xenstore_chain); =20 static void wait_for_devices(struct xenbus_driver *xendrv); =20 @@ -832,7 +832,7 @@ int register_xenstore_notifier(struct no if (xenstored_ready > 0) ret =3D nb->notifier_call(nb, 0, NULL); else - atomic_notifier_chain_register(&xenstore_chain, nb); + blocking_notifier_chain_register(&xenstore_chain, nb); =20 return ret; } @@ -840,7 +840,7 @@ EXPORT_SYMBOL_GPL(register_xenstore_noti =20 void unregister_xenstore_notifier(struct notifier_block *nb) { - atomic_notifier_chain_unregister(&xenstore_chain, nb); + blocking_notifier_chain_unregister(&xenstore_chain, nb); } EXPORT_SYMBOL_GPL(unregister_xenstore_notifier); =20 @@ -855,7 +855,7 @@ void xenbus_probe(struct work_struct *un xenbus_backend_probe_and_watch(); =20 /* Notify others that xenstore is up */ - atomic_notifier_call_chain(&xenstore_chain, 0, NULL); + blocking_notifier_call_chain(&xenstore_chain, 0, NULL); } =20 =20