mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] async: remove the temporary (2.6.29) "async is off by default" code
Date: Mon, 16 Mar 2009 20:29:04 +0100 (CET)	[thread overview]
Message-ID: <tkrat.92d38dd320374c4d@s5r6.in-berlin.de> (raw)
In-Reply-To: <20090315112438.79f40526@infradead.org>

On 15 Mar, Arjan van de Ven wrote:
> --- a/kernel/async.c
> +++ b/kernel/async.c
> @@ -391,16 +391,8 @@ static int __init async_init(void)
>  		if (IS_ERR(kthread_run(async_manager_thread, NULL,
>  				       "async/mgr")))
>  			async_enabled = 0;
> -	return 0;
> -}
> -
> -static int __init setup_async(char *str)
> -{
>  	async_enabled = 1;
> -	return 1;
> +	return 0;
>  }
>  
> -__setup("fastboot", setup_async);
> -
> -
>  core_initcall(async_init);


From: Stefan Richter <stefanr@s5r6.in-berlin.de>
Subject: async: enable it for real

Fix 'async: remove the temporary (2.6.29) "async is off by default" code'.

Also warn if the thread couldn't be started.  A start failure may have
serious side effects when more code starts to use <linux/async.h>.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---

Only compile-tested.

 kernel/async.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux/kernel/async.c
===================================================================
--- linux.orig/kernel/async.c
+++ linux/kernel/async.c
@@ -49,6 +49,7 @@ asynchronous and synchronous parts of th
 */
 
 #include <linux/async.h>
+#include <linux/bug.h>
 #include <linux/module.h>
 #include <linux/wait.h>
 #include <linux/sched.h>
@@ -387,11 +388,10 @@ static int async_manager_thread(void *un
 
 static int __init async_init(void)
 {
-	if (async_enabled)
-		if (IS_ERR(kthread_run(async_manager_thread, NULL,
-				       "async/mgr")))
-			async_enabled = 0;
-	async_enabled = 1;
+	async_enabled =
+		!IS_ERR(kthread_run(async_manager_thread, NULL, "async/mgr"));
+
+	WARN_ON(!async_enabled);
 	return 0;
 }
 


-- 
Stefan Richter
-=====-==--= --== =----
http://arcgraph.de/sr/


  parent reply	other threads:[~2009-03-16 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-15 18:23 [2.6.30] What's in the async boot tree Arjan van de Ven
2009-03-15 18:24 ` [PATCH] async: remove the temporary (2.6.29) "async is off by default" code Arjan van de Ven
2009-03-16 16:12   ` Woody Suwalski
2009-03-16 19:29   ` Stefan Richter [this message]
2009-03-16 20:26     ` Arjan van de Ven
2009-03-15 18:25 ` [PATCH] ide/net: flip the order of SATA and network init Arjan van de Ven
2009-03-15 18:25 ` [PATCH] fastboot: remove duplicate unpack_to_rootfs() Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tkrat.92d38dd320374c4d@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome