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: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
Jan Kara 2010-09-21 11:48:55 +02:00 committed by Jens Axboe
parent 180be2a042
commit 976e48f8a5

View File

@ -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)
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;
} }