[PATCH] block: add prio data check for IOPRIO_CLASS_IDLE

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

 



The idle class does not have class data, so let's
fall through to case IOPRIO_CLASS_NONE to check
the specification of data field.

Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
---
 block/ioprio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/ioprio.c b/block/ioprio.c
index 8c0f971015c9..63db916f86fb 100644
--- a/block/ioprio.c
+++ b/block/ioprio.c
@@ -78,7 +78,7 @@ int ioprio_check_cap(int ioprio)
 
 			break;
 		case IOPRIO_CLASS_IDLE:
-			break;
+			/* fall through */
 		case IOPRIO_CLASS_NONE:
 			if (data)
 				return -EINVAL;
-- 
2.17.2




[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