Skip to content

Commit

Permalink
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
Browse files Browse the repository at this point in the history
* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [BLOCK] Fix oops on removal of SD/MMC card
  • Loading branch information
Linus Torvalds committed May 5, 2006
2 parents 568cb09 + 56cf650 commit 91ef5d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ static int exact_lock(dev_t dev, void *data)
*/
void add_disk(struct gendisk *disk)
{
get_device(disk->driverfs_dev);
disk->flags |= GENHD_FL_UP;
blk_register_region(MKDEV(disk->major, disk->first_minor),
disk->minors, NULL, exact_match, exact_lock, disk);
Expand Down Expand Up @@ -427,6 +428,7 @@ static struct attribute * default_attrs[] = {
static void disk_release(struct kobject * kobj)
{
struct gendisk *disk = to_disk(kobj);
put_device(disk->driverfs_dev);
kfree(disk->random);
kfree(disk->part);
free_disk_stats(disk);
Expand Down

0 comments on commit 91ef5d2

Please sign in to comment.