Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19608
b: refs/heads/master
c: 284ae7c
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Feb 3, 2006
1 parent 021412d commit b7d8ca9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: ab11f89929b785daaa428801bd8b7e65241d7913
refs/heads/master: 284ae7cab0f7335c9e0aa8992b28415ef1a54c7c
6 changes: 4 additions & 2 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -2942,6 +2942,8 @@ static int get_array_info(mddev_t * mddev, void __user * arg)
info.ctime = mddev->ctime;
info.level = mddev->level;
info.size = mddev->size;
if (info.size != mddev->size) /* overflow */
info.size = -1;
info.nr_disks = nr;
info.raid_disks = mddev->raid_disks;
info.md_minor = mddev->md_minor;
Expand Down Expand Up @@ -3523,7 +3525,7 @@ static int update_array_info(mddev_t *mddev, mdu_array_info_t *info)
)
return -EINVAL;
/* Check there is only one change */
if (mddev->size != info->size) cnt++;
if (info->size >= 0 && mddev->size != info->size) cnt++;
if (mddev->raid_disks != info->raid_disks) cnt++;
if (mddev->layout != info->layout) cnt++;
if ((state ^ info->state) & (1<<MD_SB_BITMAP_PRESENT)) cnt++;
Expand All @@ -3540,7 +3542,7 @@ static int update_array_info(mddev_t *mddev, mdu_array_info_t *info)
else
return mddev->pers->reconfig(mddev, info->layout, -1);
}
if (mddev->size != info->size)
if (info->size >= 0 && mddev->size != info->size)
rv = update_size(mddev, info->size);

if (mddev->raid_disks != info->raid_disks)
Expand Down

0 comments on commit b7d8ca9

Please sign in to comment.