summaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-03-08 11:48:34 -0500
committerJens Axboe <axboe@fb.com>2017-03-08 12:55:17 -0500
commitc01228db4ba965986511a5b28c478bddd7e2726e (patch)
tree41fe10418d432b17e93898ed9f84b8aebc78c7ad /include/linux/genhd.h
parent90f16fddcc2802726142b8386c65ccb89f044613 (diff)
Revert "scsi, block: fix duplicate bdi name registration crashes"
This reverts commit 0dba1314d4f81115dce711292ec7981d17231064. It causes leaking of device numbers for SCSI when SCSI registers multiple gendisks for one request_queue in succession. It can be easily reproduced using Omar's script [1] on kernel with CONFIG_DEBUG_TEST_DRIVER_REMOVE. Furthermore the protection provided by this commit is not needed anymore as the problem it was fixing got also fixed by commit 165a5e22fafb "block: Move bdi_unregister() to del_gendisk()". [1]: http://marc.info/?l=linux-block&m=148554717109098&w=2 Signed-off-by: Jan Kara <jack@suse.cz> Acked-by: Dan Williams <dan.j.williams@intel.com> Tested-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index a999d281a2f1..76f39754e7b0 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -167,13 +167,6 @@ struct blk_integrity {
167}; 167};
168 168
169#endif /* CONFIG_BLK_DEV_INTEGRITY */ 169#endif /* CONFIG_BLK_DEV_INTEGRITY */
170struct disk_devt {
171 atomic_t count;
172 void (*release)(struct disk_devt *disk_devt);
173};
174
175void put_disk_devt(struct disk_devt *disk_devt);
176void get_disk_devt(struct disk_devt *disk_devt);
177 170
178struct gendisk { 171struct gendisk {
179 /* major, first_minor and minors are input parameters only, 172 /* major, first_minor and minors are input parameters only,
@@ -183,7 +176,6 @@ struct gendisk {
183 int first_minor; 176 int first_minor;
184 int minors; /* maximum number of minors, =1 for 177 int minors; /* maximum number of minors, =1 for
185 * disks that can't be partitioned. */ 178 * disks that can't be partitioned. */
186 struct disk_devt *disk_devt;
187 179
188 char disk_name[DISK_NAME_LEN]; /* name of major driver */ 180 char disk_name[DISK_NAME_LEN]; /* name of major driver */
189 char *(*devnode)(struct gendisk *gd, umode_t *mode); 181 char *(*devnode)(struct gendisk *gd, umode_t *mode);