summaryrefslogtreecommitdiffstats
path: root/fs
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 08:59:44 -0700
commit8077c0d983ab276ec5f2700df56a64d671781905 (patch)
tree1990b12806eca0a2636f5cb48de5a528a0452244 /fs
parenta207f5937630dd35bd2550620bef416937a1365e (diff)
downloadop-kernel-dev-8077c0d983ab276ec5f2700df56a64d671781905.zip
op-kernel-dev-8077c0d983ab276ec5f2700df56a64d671781905.tar.gz
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 'fs')
-rw-r--r--fs/char_dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c
index afc2bb6..b9bc05b 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -574,7 +574,8 @@ static struct kobject *base_probe(dev_t dev, int *part, void *data)
void __init chrdev_init(void)
{
cdev_map = kobj_map_init(base_probe, &chrdevs_lock);
- bdi_init(&directly_mappable_cdev_bdi);
+ if (bdi_init(&directly_mappable_cdev_bdi))
+ panic("Failed to init directly mappable cdev bdi");
}
OpenPOWER on IntegriCloud