diff options
author | NeilBrown <neilb@suse.de> | 2009-01-08 16:31:05 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-01-08 16:31:05 -0500 |
commit | 538452700d95480c16e7aa6b10ff77cd937d33f4 (patch) | |
tree | f0a25315e64ee38e59cefca1fb3bd064ffaedc46 | |
parent | 9e42d0cf5020aaf217433cad1a224745241d212a (diff) |
md: fix bitmap-on-external-file bug.
commit a2ed9615e3222645007fc19991aedf30eed3ecfd
fixed a bug with 'internal' bitmaps, but in the process broke
'in a file' bitmaps. So they are broken in 2.6.28
This fixes it, and needs to go in 2.6.28-stable.
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
-rw-r--r-- | drivers/md/bitmap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index ab7c8e4a61f9..666b7ba47ec5 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -964,9 +964,11 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) | |||
964 | */ | 964 | */ |
965 | page = bitmap->sb_page; | 965 | page = bitmap->sb_page; |
966 | offset = sizeof(bitmap_super_t); | 966 | offset = sizeof(bitmap_super_t); |
967 | read_sb_page(bitmap->mddev, bitmap->offset, | 967 | if (!file) |
968 | page, | 968 | read_sb_page(bitmap->mddev, |
969 | index, count); | 969 | bitmap->offset, |
970 | page, | ||
971 | index, count); | ||
970 | } else if (file) { | 972 | } else if (file) { |
971 | page = read_page(file, index, bitmap, count); | 973 | page = read_page(file, index, bitmap, count); |
972 | offset = 0; | 974 | offset = 0; |