Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c04f551 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by NeilBrown
Browse files

md: check return code of read_sb_page



Function read_sb_page may return ERR_PTR(...). Check for it.

Signed-off-by: default avatarVasiliy Kulikov <segooon@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent db8d9d35
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -1000,7 +1000,8 @@ 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->mddev->bitmap_info.offset,
						bitmap->mddev->bitmap_info.offset,
						page,
						page,
						index, count);
						index, count);