perf record: Fix continue profiling after draining the buffer
[linux-2.6-microblaze.git] / block / ioprio.c
index 04ebd37..364d229 100644 (file)
@@ -69,7 +69,7 @@ int ioprio_check_cap(int ioprio)
 
        switch (class) {
                case IOPRIO_CLASS_RT:
-                       if (!capable(CAP_SYS_ADMIN))
+                       if (!capable(CAP_SYS_NICE) && !capable(CAP_SYS_ADMIN))
                                return -EPERM;
                        fallthrough;
                        /* rt has prio field too */