Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362344
b: refs/heads/master
c: c2fccc1
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Apr 8, 2013
1 parent b6ec28f commit 65854fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 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: c66bb3f075cfe2d17b2427e96e043622db02759c
refs/heads/master: c2fccc1c9f7c81700cbac2120a4ad5441dd37004
1 change: 0 additions & 1 deletion trunk/block/partition-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ void delete_partition(struct gendisk *disk, int partno)

hd_struct_put(part);
}
EXPORT_SYMBOL(delete_partition);

static ssize_t whole_disk_show(struct device *dev,
struct device_attribute *attr, char *buf)
Expand Down
21 changes: 2 additions & 19 deletions trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,29 +1044,12 @@ static int loop_clr_fd(struct loop_device *lo)
lo->lo_state = Lo_unbound;
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
if (lo->lo_flags & LO_FLAGS_PARTSCAN && bdev)
ioctl_by_bdev(bdev, BLKRRPART, 0);
lo->lo_flags = 0;
if (!part_shift)
lo->lo_disk->flags |= GENHD_FL_NO_PART_SCAN;
mutex_unlock(&lo->lo_ctl_mutex);

/*
* Remove all partitions, since BLKRRPART won't remove user
* added partitions when max_part=0
*/
if (bdev) {
struct disk_part_iter piter;
struct hd_struct *part;

mutex_lock_nested(&bdev->bd_mutex, 1);
invalidate_partition(bdev->bd_disk, 0);
disk_part_iter_init(&piter, bdev->bd_disk,
DISK_PITER_INCL_EMPTY);
while ((part = disk_part_iter_next(&piter)))
delete_partition(bdev->bd_disk, part->partno);
disk_part_iter_exit(&piter);
mutex_unlock(&bdev->bd_mutex);
}

/*
* Need not hold lo_ctl_mutex to fput backing file.
* Calling fput holding lo_ctl_mutex triggers a circular
Expand Down

0 comments on commit 65854fe

Please sign in to comment.