block: Introduce IOPRIO_NR_LEVELS
[linux-2.6-microblaze.git] / block / ioprio.c
index bee628f..ca6b136 100644 (file)
@@ -74,9 +74,8 @@ int ioprio_check_cap(int ioprio)
                        fallthrough;
                        /* rt has prio field too */
                case IOPRIO_CLASS_BE:
-                       if (data >= IOPRIO_BE_NR || data < 0)
+                       if (data >= IOPRIO_NR_LEVELS || data < 0)
                                return -EINVAL;
-
                        break;
                case IOPRIO_CLASS_IDLE:
                        break;