Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95099
b: refs/heads/master
c: 11e2ede
h: refs/heads/master
i:
  95097: 76f55d9
  95095: 6de3f07
v: v3
  • Loading branch information
Dan Williams authored and Linus Torvalds committed Apr 30, 2008
1 parent 458044f commit 6b64abe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 242b363e2207d14125f52a6701cfda7376a2a2fc
refs/heads/master: 11e2ede0228ee0f81ccacd15894908c3bf241f73
5 changes: 5 additions & 0 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,11 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
MD_BUG();
return -EINVAL;
}

/* prevent duplicates */
if (find_rdev(mddev, rdev->bdev->bd_dev))
return -EEXIST;

/* make sure rdev->size exceeds mddev->size */
if (rdev->size && (mddev->size == 0 || rdev->size < mddev->size)) {
if (mddev->pers) {
Expand Down

0 comments on commit 6b64abe

Please sign in to comment.