Commit 976e48f8 authored by Jan Kara's avatar Jan Kara Committed by Jens Axboe

bdi: Initialize noop_backing_dev_info properly

Properly initialize this backing dev info so that writeback code does not
barf when getting to it e.g. via sb->s_bdi.

Cc: stable@kernel.org
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 180be2a0
...@@ -30,6 +30,7 @@ EXPORT_SYMBOL_GPL(default_backing_dev_info); ...@@ -30,6 +30,7 @@ EXPORT_SYMBOL_GPL(default_backing_dev_info);
struct backing_dev_info noop_backing_dev_info = { struct backing_dev_info noop_backing_dev_info = {
.name = "noop", .name = "noop",
.capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
}; };
EXPORT_SYMBOL_GPL(noop_backing_dev_info); EXPORT_SYMBOL_GPL(noop_backing_dev_info);
...@@ -243,6 +244,7 @@ static int __init default_bdi_init(void) ...@@ -243,6 +244,7 @@ static int __init default_bdi_init(void)
err = bdi_init(&default_backing_dev_info); err = bdi_init(&default_backing_dev_info);
if (!err) if (!err)
bdi_register(&default_backing_dev_info, NULL, "default"); bdi_register(&default_backing_dev_info, NULL, "default");
err = bdi_init(&noop_backing_dev_info);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment