mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mm: bdi init hooks
provide BDI constructor/destructor hooks [[email protected]: compile fix] Signed-off-by: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dc62a30e27
commit
e0bf68ddec
19 changed files with 131 additions and 7 deletions
|
|
@ -411,6 +411,9 @@ static void __exit rd_cleanup(void)
|
|||
blk_cleanup_queue(rd_queue[i]);
|
||||
}
|
||||
unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
|
||||
|
||||
bdi_destroy(&rd_file_backing_dev_info);
|
||||
bdi_destroy(&rd_backing_dev_info);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -419,7 +422,19 @@ static void __exit rd_cleanup(void)
|
|||
static int __init rd_init(void)
|
||||
{
|
||||
int i;
|
||||
int err = -ENOMEM;
|
||||
int err;
|
||||
|
||||
err = bdi_init(&rd_backing_dev_info);
|
||||
if (err)
|
||||
goto out2;
|
||||
|
||||
err = bdi_init(&rd_file_backing_dev_info);
|
||||
if (err) {
|
||||
bdi_destroy(&rd_backing_dev_info);
|
||||
goto out2;
|
||||
}
|
||||
|
||||
err = -ENOMEM;
|
||||
|
||||
if (rd_blocksize > PAGE_SIZE || rd_blocksize < 512 ||
|
||||
(rd_blocksize & (rd_blocksize-1))) {
|
||||
|
|
@ -473,6 +488,9 @@ out:
|
|||
put_disk(rd_disks[i]);
|
||||
blk_cleanup_queue(rd_queue[i]);
|
||||
}
|
||||
bdi_destroy(&rd_backing_dev_info);
|
||||
bdi_destroy(&rd_file_backing_dev_info);
|
||||
out2:
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue