mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-09-22 12:42:50 +00:00
md: check return code of read_sb_page
Function read_sb_page may return ERR_PTR(...). Check for it. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
db8d9d3591
commit
5c04f5512f
1 changed files with 5 additions and 4 deletions
|
@ -1000,10 +1000,11 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
|
||||||
page = bitmap->sb_page;
|
page = bitmap->sb_page;
|
||||||
offset = sizeof(bitmap_super_t);
|
offset = sizeof(bitmap_super_t);
|
||||||
if (!file)
|
if (!file)
|
||||||
read_sb_page(bitmap->mddev,
|
page = read_sb_page(
|
||||||
bitmap->mddev->bitmap_info.offset,
|
bitmap->mddev,
|
||||||
page,
|
bitmap->mddev->bitmap_info.offset,
|
||||||
index, count);
|
page,
|
||||||
|
index, count);
|
||||||
} else if (file) {
|
} else if (file) {
|
||||||
page = read_page(file, index, bitmap, count);
|
page = read_page(file, index, bitmap, count);
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
Loading…
Reference in a new issue