diff options
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 3c74ea729fc7..013c5daddb0b 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <linux/blkdev.h> | 63 | #include <linux/blkdev.h> |
64 | #include <linux/blkpg.h> | 64 | #include <linux/blkpg.h> |
65 | #include <linux/init.h> | 65 | #include <linux/init.h> |
66 | #include <linux/devfs_fs_kernel.h> | ||
67 | #include <linux/smp_lock.h> | 66 | #include <linux/smp_lock.h> |
68 | #include <linux/swap.h> | 67 | #include <linux/swap.h> |
69 | #include <linux/slab.h> | 68 | #include <linux/slab.h> |
@@ -210,7 +209,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, | |||
210 | { | 209 | { |
211 | struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */ | 210 | struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */ |
212 | struct address_space *mapping = file->f_mapping; | 211 | struct address_space *mapping = file->f_mapping; |
213 | struct address_space_operations *aops = mapping->a_ops; | 212 | const struct address_space_operations *aops = mapping->a_ops; |
214 | pgoff_t index; | 213 | pgoff_t index; |
215 | unsigned offset, bv_offs; | 214 | unsigned offset, bv_offs; |
216 | int len, ret; | 215 | int len, ret; |
@@ -784,7 +783,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file, | |||
784 | 783 | ||
785 | error = -EINVAL; | 784 | error = -EINVAL; |
786 | if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) { | 785 | if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) { |
787 | struct address_space_operations *aops = mapping->a_ops; | 786 | const struct address_space_operations *aops = mapping->a_ops; |
788 | /* | 787 | /* |
789 | * If we can't read - sorry. If we only can't write - well, | 788 | * If we can't read - sorry. If we only can't write - well, |
790 | * it's going to be read-only. | 789 | * it's going to be read-only. |
@@ -1277,8 +1276,6 @@ static int __init loop_init(void) | |||
1277 | goto out_mem3; | 1276 | goto out_mem3; |
1278 | } | 1277 | } |
1279 | 1278 | ||
1280 | devfs_mk_dir("loop"); | ||
1281 | |||
1282 | for (i = 0; i < max_loop; i++) { | 1279 | for (i = 0; i < max_loop; i++) { |
1283 | struct loop_device *lo = &loop_dev[i]; | 1280 | struct loop_device *lo = &loop_dev[i]; |
1284 | struct gendisk *disk = disks[i]; | 1281 | struct gendisk *disk = disks[i]; |
@@ -1296,7 +1293,6 @@ static int __init loop_init(void) | |||
1296 | disk->first_minor = i; | 1293 | disk->first_minor = i; |
1297 | disk->fops = &lo_fops; | 1294 | disk->fops = &lo_fops; |
1298 | sprintf(disk->disk_name, "loop%d", i); | 1295 | sprintf(disk->disk_name, "loop%d", i); |
1299 | sprintf(disk->devfs_name, "loop/%d", i); | ||
1300 | disk->private_data = lo; | 1296 | disk->private_data = lo; |
1301 | disk->queue = lo->lo_queue; | 1297 | disk->queue = lo->lo_queue; |
1302 | } | 1298 | } |
@@ -1310,7 +1306,6 @@ static int __init loop_init(void) | |||
1310 | out_mem4: | 1306 | out_mem4: |
1311 | while (i--) | 1307 | while (i--) |
1312 | blk_cleanup_queue(loop_dev[i].lo_queue); | 1308 | blk_cleanup_queue(loop_dev[i].lo_queue); |
1313 | devfs_remove("loop"); | ||
1314 | i = max_loop; | 1309 | i = max_loop; |
1315 | out_mem3: | 1310 | out_mem3: |
1316 | while (i--) | 1311 | while (i--) |
@@ -1333,7 +1328,6 @@ static void loop_exit(void) | |||
1333 | blk_cleanup_queue(loop_dev[i].lo_queue); | 1328 | blk_cleanup_queue(loop_dev[i].lo_queue); |
1334 | put_disk(disks[i]); | 1329 | put_disk(disks[i]); |
1335 | } | 1330 | } |
1336 | devfs_remove("loop"); | ||
1337 | if (unregister_blkdev(LOOP_MAJOR, "loop")) | 1331 | if (unregister_blkdev(LOOP_MAJOR, "loop")) |
1338 | printk(KERN_WARNING "loop: cannot unregister blkdev\n"); | 1332 | printk(KERN_WARNING "loop: cannot unregister blkdev\n"); |
1339 | 1333 | ||