Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127727
b: refs/heads/master
c: 159ec1f
h: refs/heads/master
i:
  127725: a06a253
  127723: 7b9edc7
  127719: 5b51249
  127711: a18e85e
v: v3
  • Loading branch information
Cheng Renquan authored and NeilBrown committed Jan 8, 2009
1 parent 8c650aa commit 25c2310
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 95 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: ccacc7d2cf03114a24ab903f710118e9e5d43273
refs/heads/master: 159ec1fc060ab22b157a62364045f5e98749c4d3
3 changes: 1 addition & 2 deletions trunk/drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,14 @@ static struct page *read_sb_page(mddev_t *mddev, long offset,
/* choose a good rdev and read the page from there */

mdk_rdev_t *rdev;
struct list_head *tmp;
sector_t target;

if (!page)
page = alloc_page(GFP_KERNEL);
if (!page)
return ERR_PTR(-ENOMEM);

rdev_for_each(rdev, tmp, mddev) {
list_for_each_entry(rdev, &mddev->disks, same_set) {
if (! test_bit(In_sync, &rdev->flags)
|| test_bit(Faulty, &rdev->flags))
continue;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/md/faulty.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ static int reconfig(mddev_t *mddev, int layout, int chunk_size)
static int run(mddev_t *mddev)
{
mdk_rdev_t *rdev;
struct list_head *tmp;
int i;

conf_t *conf = kmalloc(sizeof(*conf), GFP_KERNEL);
Expand All @@ -296,7 +295,7 @@ static int run(mddev_t *mddev)
}
conf->nfaults = 0;

rdev_for_each(rdev, tmp, mddev)
list_for_each_entry(rdev, &mddev->disks, same_set)
conf->rdev = rdev;

mddev->array_sectors = mddev->size * 2;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/md/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
int i, nb_zone, cnt;
sector_t min_sectors;
sector_t curr_sector;
struct list_head *tmp;

conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(dev_info_t),
GFP_KERNEL);
Expand All @@ -115,7 +114,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
cnt = 0;
conf->array_sectors = 0;

rdev_for_each(rdev, tmp, mddev) {
list_for_each_entry(rdev, &mddev->disks, same_set) {
int j = rdev->raid_disk;
dev_info_t *disk = conf->disks + j;

Expand Down
Loading

0 comments on commit 25c2310

Please sign in to comment.