Skip to content

Commit 546ac0b

Browse files
Christoph Hellwigliu-song-6
authored andcommitted
md-bitmap: initialize variables at declaration time in md_bitmap_file_unmap
Just a small tidyup to prepare for bigger changes. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 59cefee commit 546ac0b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/md/md-bitmap.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,10 @@ static int md_bitmap_storage_alloc(struct bitmap_storage *store,
842842

843843
static void md_bitmap_file_unmap(struct bitmap_storage *store)
844844
{
845-
struct page **map, *sb_page;
846-
int pages;
847-
struct file *file;
848-
849-
file = store->file;
850-
map = store->filemap;
851-
pages = store->file_pages;
852-
sb_page = store->sb_page;
845+
struct file *file = store->file;
846+
struct page *sb_page = store->sb_page;
847+
struct page **map = store->filemap;
848+
int pages = store->file_pages;
853849

854850
while (pages--)
855851
if (map[pages] != sb_page) /* 0 is sb_page, release it below */

0 commit comments

Comments
 (0)