diff options
| author | Nigel Cunningham <ncunningham@linuxmail.org> | 2004-11-08 03:52:15 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-08 03:52:15 -0800 |
| commit | 34fe9c27f1cf97ed05df24d7000ea2f9590b6639 (patch) | |
| tree | 010bea3f235ffbb551dae66ef1b9e5ef87e763de | |
| parent | c887c605ee3bf9d69a284a2d908d6b8c725b7990 (diff) | |
[PATCH] Fix dm_io.c oops in low memory conditions.
If you call drivers/md/dm-io.c:resize_pool on an empty pool and
mempool_create is unable to make the pool, the condition is not handled
correctly, resulting in an oops in mempool_destroy.
Trivial fix.
| -rw-r--r-- | drivers/md/dm-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index 9f3fb61fdf4f..cb7a43fde875 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -267,7 +267,7 @@ static int resize_pool(unsigned int new_ios) /* create new pool */ _io_pool = mempool_create(new_ios, alloc_io, free_io, NULL); if (!_io_pool) - r = -ENOMEM; + return -ENOMEM; r = bio_set_init(&_bios, "dm-io", 512, 1); if (r) { |
