genhd: fix leftover might_sleep() in blk_free_devt()

Commit 2da78092 changed the locking from a mutex to a spinlock,
so we now longer sleep in this context. But there was a leftover
might_sleep() in there, which now triggers since we do the final
free from an RCU callback. Get rid of it.

Reported-by: Pontus Fuchs <>
Signed-off-by: Jens Axboe <>
diff --git a/block/genhd.c b/block/genhd.c
index 09da5e4..e6723bd 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -445,8 +445,6 @@
 void blk_free_devt(dev_t devt)
-	might_sleep();
 	if (devt == MKDEV(0, 0))