Patch "floppy: use blk_cleanup_disk()" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    floppy: use blk_cleanup_disk()

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     floppy-use-blk_cleanup_disk.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 630bbade23d7da6e8b1920e35f6653f73bc05acc
Author: Luis Chamberlain <mcgrof@xxxxxxxxxx>
Date:   Mon Sep 27 15:02:51 2021 -0700

    floppy: use blk_cleanup_disk()
    
    [ Upstream commit 3776339ae7acaf9590c668e86f45005fc9aff014 ]
    
    Use the blk_cleanup_queue() followed by put_disk() can be
    replaced with blk_cleanup_disk(). No need for two separate
    loops.
    
    Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210927220302.1073499-4-mcgrof@xxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 3e6390fd5f2be..9538146e520e0 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4950,13 +4950,9 @@ static void __exit floppy_module_exit(void)
 		}
 		for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
 			if (disks[drive][i])
-				blk_cleanup_queue(disks[drive][i]->queue);
+				blk_cleanup_disk(disks[drive][i]);
 		}
 		blk_mq_free_tag_set(&tag_sets[drive]);
-		for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
-			if (disks[drive][i])
-				put_disk(disks[drive][i]);
-		}
 	}
 
 	cancel_delayed_work_sync(&fd_timeout);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux