Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305944
b: refs/heads/master
c: bc9891a
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed May 22, 2012
1 parent 8c41db0 commit e3cc217
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1244cb062750bdb2298ca2565239d3d8cbd91a8
refs/heads/master: bc9891a8853842a19c33dda0ba02fbacf7da067f
11 changes: 6 additions & 5 deletions trunk/drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,11 +1032,6 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
goto err;
}

ret = bitmap_storage_alloc(&bitmap->storage, bitmap->chunks,
!bitmap->mddev->bitmap_info.external);
if (ret)
goto err;

oldindex = ~0L;
offset = 0;
if (!bitmap->mddev->bitmap_info.external)
Expand Down Expand Up @@ -1782,6 +1777,12 @@ int bitmap_create(struct mddev *mddev)
if (!bitmap->bp)
goto error;

if (file || mddev->bitmap_info.offset) {
err = bitmap_storage_alloc(&bitmap->storage, bitmap->chunks,
!mddev->bitmap_info.external);
if (err)
goto error;
}
printk(KERN_INFO "created bitmap (%lu pages) for device %s\n",
pages, bmname(bitmap));

Expand Down

0 comments on commit e3cc217

Please sign in to comment.