aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-04-22 20:32:51 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-22 20:32:51 -0400
commit6e0895c2ea326cc4bb11e8fa2f654628d5754c31 (patch)
tree7089303ac11a12edc43a8c4fa1b23974e10937ea /drivers/block/loop.c
parent55fbbe46e9eb3cbe6c335503f5550855a1128dce (diff)
parent60d509fa6a9c4653a86ad830e4c4b30360b23f0e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/emulex/benet/be_main.c drivers/net/ethernet/intel/igb/igb_main.c drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c include/net/scm.h net/batman-adv/routing.c net/ipv4/tcp_input.c The e{uid,gid} --> {uid,gid} credentials fix conflicted with the cleanup in net-next to now pass cred structs around. The be2net driver had a bug fix in 'net' that overlapped with the VLAN interface changes by Patrick McHardy in net-next. An IGB conflict existed because in 'net' the build_skb() support was reverted, and in 'net-next' there was a comment style fix within that code. Several batman-adv conflicts were resolved by making sure that all calls to batadv_is_my_mac() are changed to have a new bat_priv first argument. Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO rewrite in 'net-next', mostly overlapping changes. Thanks to Stephen Rothwell and Antonio Quartulli for help with several of these merge resolutions. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 2c127f9c3f3b..dfe758382eaf 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1051,29 +1051,12 @@ static int loop_clr_fd(struct loop_device *lo)
1051 lo->lo_state = Lo_unbound; 1051 lo->lo_state = Lo_unbound;
1052 /* This is safe: open() is still holding a reference. */ 1052 /* This is safe: open() is still holding a reference. */
1053 module_put(THIS_MODULE); 1053 module_put(THIS_MODULE);
1054 if (lo->lo_flags & LO_FLAGS_PARTSCAN && bdev)
1055 ioctl_by_bdev(bdev, BLKRRPART, 0);
1054 lo->lo_flags = 0; 1056 lo->lo_flags = 0;
1055 if (!part_shift) 1057 if (!part_shift)
1056 lo->lo_disk->flags |= GENHD_FL_NO_PART_SCAN; 1058 lo->lo_disk->flags |= GENHD_FL_NO_PART_SCAN;
1057 mutex_unlock(&lo->lo_ctl_mutex); 1059 mutex_unlock(&lo->lo_ctl_mutex);
1058
1059 /*
1060 * Remove all partitions, since BLKRRPART won't remove user
1061 * added partitions when max_part=0
1062 */
1063 if (bdev) {
1064 struct disk_part_iter piter;
1065 struct hd_struct *part;
1066
1067 mutex_lock_nested(&bdev->bd_mutex, 1);
1068 invalidate_partition(bdev->bd_disk, 0);
1069 disk_part_iter_init(&piter, bdev->bd_disk,
1070 DISK_PITER_INCL_EMPTY);
1071 while ((part = disk_part_iter_next(&piter)))
1072 delete_partition(bdev->bd_disk, part->partno);
1073 disk_part_iter_exit(&piter);
1074 mutex_unlock(&bdev->bd_mutex);
1075 }
1076
1077 /* 1060 /*
1078 * Need not hold lo_ctl_mutex to fput backing file. 1061 * Need not hold lo_ctl_mutex to fput backing file.
1079 * Calling fput holding lo_ctl_mutex triggers a circular 1062 * Calling fput holding lo_ctl_mutex triggers a circular