diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/amiflop.c | 2 | ||||
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 8 | ||||
-rw-r--r-- | drivers/block/loop.c | 4 | ||||
-rw-r--r-- | drivers/block/rd.c | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 5d6562171533..27a139025ced 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
@@ -1480,7 +1480,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, | |||
1480 | break; | 1480 | break; |
1481 | case FDFMTEND: | 1481 | case FDFMTEND: |
1482 | floppy_off(drive); | 1482 | floppy_off(drive); |
1483 | invalidate_bdev(inode->i_bdev, 0); | 1483 | invalidate_bdev(inode->i_bdev); |
1484 | break; | 1484 | break; |
1485 | case FDGETPRM: | 1485 | case FDGETPRM: |
1486 | memset((void *)&getprm, 0, sizeof (getprm)); | 1486 | memset((void *)&getprm, 0, sizeof (getprm)); |
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 1a6aeac5a1c3..01fbdd38e3be 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -194,15 +194,15 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail) | |||
194 | sl = sl_tail = NULL; | 194 | sl = sl_tail = NULL; |
195 | 195 | ||
196 | read_lock(&dev_base_lock); | 196 | read_lock(&dev_base_lock); |
197 | for (ifp = dev_base; ifp; dev_put(ifp), ifp = ifp->next) { | 197 | for_each_netdev(ifp) { |
198 | dev_hold(ifp); | 198 | dev_hold(ifp); |
199 | if (!is_aoe_netif(ifp)) | 199 | if (!is_aoe_netif(ifp)) |
200 | continue; | 200 | goto cont; |
201 | 201 | ||
202 | skb = new_skb(sizeof *h + sizeof *ch); | 202 | skb = new_skb(sizeof *h + sizeof *ch); |
203 | if (skb == NULL) { | 203 | if (skb == NULL) { |
204 | printk(KERN_INFO "aoe: skb alloc failure\n"); | 204 | printk(KERN_INFO "aoe: skb alloc failure\n"); |
205 | continue; | 205 | goto cont; |
206 | } | 206 | } |
207 | skb_put(skb, sizeof *h + sizeof *ch); | 207 | skb_put(skb, sizeof *h + sizeof *ch); |
208 | skb->dev = ifp; | 208 | skb->dev = ifp; |
@@ -221,6 +221,8 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail) | |||
221 | 221 | ||
222 | skb->next = sl; | 222 | skb->next = sl; |
223 | sl = skb; | 223 | sl = skb; |
224 | cont: | ||
225 | dev_put(ifp); | ||
224 | } | 226 | } |
225 | read_unlock(&dev_base_lock); | 227 | read_unlock(&dev_base_lock); |
226 | 228 | ||
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 6b5b64207407..0d4ccd4a0957 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -833,7 +833,7 @@ out_clr: | |||
833 | lo->lo_backing_file = NULL; | 833 | lo->lo_backing_file = NULL; |
834 | lo->lo_flags = 0; | 834 | lo->lo_flags = 0; |
835 | set_capacity(disks[lo->lo_number], 0); | 835 | set_capacity(disks[lo->lo_number], 0); |
836 | invalidate_bdev(bdev, 0); | 836 | invalidate_bdev(bdev); |
837 | bd_set_size(bdev, 0); | 837 | bd_set_size(bdev, 0); |
838 | mapping_set_gfp_mask(mapping, lo->old_gfp_mask); | 838 | mapping_set_gfp_mask(mapping, lo->old_gfp_mask); |
839 | lo->lo_state = Lo_unbound; | 839 | lo->lo_state = Lo_unbound; |
@@ -917,7 +917,7 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev) | |||
917 | memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE); | 917 | memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE); |
918 | memset(lo->lo_crypt_name, 0, LO_NAME_SIZE); | 918 | memset(lo->lo_crypt_name, 0, LO_NAME_SIZE); |
919 | memset(lo->lo_file_name, 0, LO_NAME_SIZE); | 919 | memset(lo->lo_file_name, 0, LO_NAME_SIZE); |
920 | invalidate_bdev(bdev, 0); | 920 | invalidate_bdev(bdev); |
921 | set_capacity(disks[lo->lo_number], 0); | 921 | set_capacity(disks[lo->lo_number], 0); |
922 | bd_set_size(bdev, 0); | 922 | bd_set_size(bdev, 0); |
923 | mapping_set_gfp_mask(filp->f_mapping, gfp); | 923 | mapping_set_gfp_mask(filp->f_mapping, gfp); |
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 485aa87e9bcd..43d4ebcb3b44 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c | |||
@@ -403,7 +403,7 @@ static void __exit rd_cleanup(void) | |||
403 | struct block_device *bdev = rd_bdev[i]; | 403 | struct block_device *bdev = rd_bdev[i]; |
404 | rd_bdev[i] = NULL; | 404 | rd_bdev[i] = NULL; |
405 | if (bdev) { | 405 | if (bdev) { |
406 | invalidate_bdev(bdev, 1); | 406 | invalidate_bdev(bdev); |
407 | blkdev_put(bdev); | 407 | blkdev_put(bdev); |
408 | } | 408 | } |
409 | del_gendisk(rd_disks[i]); | 409 | del_gendisk(rd_disks[i]); |