Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: floppy: fix rmmod lockup

Floppy rmmod locks up when no such hardware was initialized, since there is
nobody to wake the remove code up. Remove the completion, because release is
called during platform_unregister anyway.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jiri Slaby and committed by
Linus Torvalds
f2005e17 bd0e88e5

-5
-5
drivers/block/floppy.c
··· 217 217 */ 218 218 219 219 static DEFINE_SPINLOCK(floppy_lock); 220 - static struct completion device_release; 221 220 222 221 static unsigned short virtual_dma_port = 0x3f0; 223 222 irqreturn_t floppy_interrupt(int irq, void *dev_id); ··· 4143 4144 4144 4145 static void floppy_device_release(struct device *dev) 4145 4146 { 4146 - complete(&device_release); 4147 4147 } 4148 4148 4149 4149 static struct platform_device floppy_device[N_DRIVE]; ··· 4537 4539 { 4538 4540 int drive; 4539 4541 4540 - init_completion(&device_release); 4541 4542 blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); 4542 4543 unregister_blkdev(FLOPPY_MAJOR, "fd"); 4543 4544 ··· 4561 4564 4562 4565 /* eject disk, if any */ 4563 4566 fd_eject(0); 4564 - 4565 - wait_for_completion(&device_release); 4566 4567 } 4567 4568 4568 4569 module_param(floppy, charp, 0);