Skip to contentSkip to conversation

aio: check return value of create_workqueue()

PATCH In review Namhyung Kim 2 participants 2 messages Dec 13, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aio: check return value of create_workqueue()

---
 fs/aio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/aio.c +1 -1
index 8c8f6c5b6d79..c56153f5f73e 100644
@@ -87,7 +87,7 @@ static int __init aio_setup(void)
 
 	aio_wq = create_workqueue("aio");
 	abe_pool = mempool_create_kmalloc_pool(1, sizeof(struct aio_batch_entry));
-	BUG_ON(!abe_pool);
+	BUG_ON(!aio_wq || !abe_pool);
 
 	pr_debug("aio_setup: sizeof(struct page) = %d\n", (int)sizeof(struct page));
 
Signature · 7 lines
1.7.3.3.400.g93cef

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected].  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Namhyung Kim
---
 fs/aio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/aio.c +0 -0
index 8c8f6c5b6d79..c56153f5f73e 100644

fs/aio.c static int __init aio_setup(void) · line 92

Quoted 7 lines
fs/aio.c +1 -1
@@ -87,7 +87,7 @@ static int __init aio_setup(void)
 
 	aio_wq = create_workqueue("aio");
 	abe_pool = mempool_create_kmalloc_pool(1, sizeof(struct aio_batch_entry));
-	BUG_ON(!abe_pool);
+	BUG_ON(!aio_wq || !abe_pool);
 
 	pr_debug("aio_setup: sizeof(struct page) = %d\n", (int)sizeof(struct page));

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>