Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305931
b: refs/heads/master
c: 4fa2f32
h: refs/heads/master
i:
  305929: f7c3e36
  305927: b84084d
v: v3
  • Loading branch information
NeilBrown committed May 22, 2012
1 parent ed2a989 commit 2fa380a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: 545c87957f4d53867b62921625f36df8c4b1bc08
refs/heads/master: 4fa2f327681808f653711e14203a42cf4644bda0
5 changes: 2 additions & 3 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,8 @@ void md_rdev_clear(struct md_rdev *rdev)
put_page(rdev->bb_page);
rdev->bb_page = NULL;
}
kfree(rdev->badblocks.page);
rdev->badblocks.page = NULL;
}
EXPORT_SYMBOL_GPL(md_rdev_clear);

Expand Down Expand Up @@ -2191,9 +2193,7 @@ static void unbind_rdev_from_array(struct md_rdev * rdev)
sysfs_remove_link(&rdev->kobj, "block");
sysfs_put(rdev->sysfs_state);
rdev->sysfs_state = NULL;
kfree(rdev->badblocks.page);
rdev->badblocks.count = 0;
rdev->badblocks.page = NULL;
/* We need to delay this, otherwise we can deadlock when
* writing to 'remove' to "dev/state". We also need
* to delay it due to rcu usage.
Expand Down Expand Up @@ -3325,7 +3325,6 @@ static struct md_rdev *md_import_device(dev_t newdev, int super_format, int supe
if (rdev->bdev)
unlock_rdev(rdev);
md_rdev_clear(rdev);
kfree(rdev->badblocks.page);
kfree(rdev);
return ERR_PTR(err);
}
Expand Down

0 comments on commit 2fa380a

Please sign in to comment.