diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2013-10-14 12:14:13 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-11-08 08:59:44 -0700 |
commit | 8077c0d983ab276ec5f2700df56a64d671781905 (patch) | |
tree | 1990b12806eca0a2636f5cb48de5a528a0452244 /mm | |
parent | a207f5937630dd35bd2550620bef416937a1365e (diff) |
bdi: test bdi_init failure
There were two places where return value from bdi_init was not tested.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/swap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/swap.c b/mm/swap.c index 759c3caf44b..7a9f80d451f 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -934,7 +934,8 @@ void __init swap_setup(void) #ifdef CONFIG_SWAP int i; - bdi_init(swapper_spaces[0].backing_dev_info); + if (bdi_init(swapper_spaces[0].backing_dev_info)) + panic("Failed to init swap bdi"); for (i = 0; i < MAX_SWAPFILES; i++) { spin_lock_init(&swapper_spaces[i].tree_lock); INIT_LIST_HEAD(&swapper_spaces[i].i_mmap_nonlinear); |