md/bitmap: centralise allocation of bitmap file pages.
authorNeilBrown <neilb@suse.de>
Tue, 22 May 2012 03:55:08 +0000 (13:55 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 22 May 2012 03:55:08 +0000 (13:55 +1000)
commit27581e5ae01f77b5472dc5c2368b41063fed7f37
tree202d2ee37bcfb82ce09bc72c0d3d81045a941637
parentef99bf480de9bde9d3b2afdf05324670fab4e571
md/bitmap: centralise allocation of bitmap file pages.

Instead of allocating pages in read_sb_page, read_page and
bitmap_read_sb, allocate them all in bitmap_init_from disk.

Also replace the hack of calling "attach_page_buffers(page, NULL)" to
ensure that free_buffer() won't complain, by putting a test for
PagePrivate in free_buffer().

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/bitmap.c