[PATCH 2/2] block: remove unnecessary statement in blk_free_devt

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

 



If devt is MKDEV(0, 0), its MAJOR cannot be BLOCK_EXT_MAJOR,
so, I think we can remove the statement.

Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx>
---
 block/genhd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/genhd.c b/block/genhd.c
index f00198e6758a..961b2bc4634f 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -522,9 +522,6 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)
  */
 void blk_free_devt(dev_t devt)
 {
-	if (devt == MKDEV(0, 0))
-		return;
-
 	if (MAJOR(devt) == BLOCK_EXT_MAJOR) {
 		spin_lock_bh(&ext_devt_lock);
 		idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
-- 
2.16.2.dirty




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux