aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2013-10-14 12:14:13 -0400
committerJens Axboe <axboe@kernel.dk>2013-11-08 10:59:44 -0500
commit8077c0d983ab276ec5f2700df56a64d671781905 (patch)
tree1990b12806eca0a2636f5cb48de5a528a0452244 /mm
parenta207f5937630dd35bd2550620bef416937a1365e (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/swap.c b/mm/swap.c
index 759c3caf44bd..7a9f80d451f5 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -934,7 +934,8 @@ void __init swap_setup(void)
934#ifdef CONFIG_SWAP 934#ifdef CONFIG_SWAP
935 int i; 935 int i;
936 936
937 bdi_init(swapper_spaces[0].backing_dev_info); 937 if (bdi_init(swapper_spaces[0].backing_dev_info))
938 panic("Failed to init swap bdi");
938 for (i = 0; i < MAX_SWAPFILES; i++) { 939 for (i = 0; i < MAX_SWAPFILES; i++) {
939 spin_lock_init(&swapper_spaces[i].tree_lock); 940 spin_lock_init(&swapper_spaces[i].tree_lock);
940 INIT_LIST_HEAD(&swapper_spaces[i].i_mmap_nonlinear); 941 INIT_LIST_HEAD(&swapper_spaces[i].i_mmap_nonlinear);