summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2013-10-14 18:14:13 +0200
committerJens Axboe <axboe@kernel.dk>2013-11-08 16:59:44 +0100
commit8077c0d983ab276ec5f2700df56a64d671781905 (patch)
tree1990b12806eca0a2636f5cb48de5a528a0452244 /mm
parentblock: fix a probe argument to blk_register_region (diff)
downloadlinux-8077c0d983ab276ec5f2700df56a64d671781905.tar.xz
linux-8077c0d983ab276ec5f2700df56a64d671781905.zip
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)
#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);