md/raid1: improve handling of pages allocated for write-behind.
authorNeilBrown <neilb@suse.de>
Wed, 11 May 2011 04:51:19 +0000 (14:51 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 11 May 2011 04:51:19 +0000 (14:51 +1000)
commitaf6d7b760c7547c1a410a333bdb24daed24e1043
tree5789fa005f94911bc6a92a6cb8700b8025a3adc4
parent7ca78d57d11a91bc93b35342fa58647b85bedeb1
md/raid1: improve handling of pages allocated for write-behind.

The current handling and freeing of these pages is a bit fragile.
We only keep the list of allocated pages in each bio, so we need to
still have a valid bio when freeing the pages, which is a bit clumsy.

So simply store the allocated page list in the r1_bio so it can easily
be found and freed when we are finished with the r1_bio.

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