[Devel] [PATCH rh7 1/7] ioprio: move IOPRIO_WHO_UBC handling out of rcu section
Vladimir Davydov
vdavydov at parallels.com
Tue Jun 9 07:06:42 PDT 2015
There is no point in having it there, and I need to sleep in
ub_set_ioprio.
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
fs/ioprio.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 277c73fbf438..b54e34e6bd35 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -108,6 +108,12 @@ SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio)
return -EINVAL;
}
+ if (which == IOPRIO_WHO_UBC) {
+ if (class != IOPRIO_CLASS_BE)
+ return -ERANGE;
+ return ub_set_ioprio(who, data);
+ }
+
ret = -ESRCH;
rcu_read_lock();
switch (which) {
@@ -153,14 +159,6 @@ free_uid:
if (who)
free_uid(user);
break;
- case IOPRIO_WHO_UBC:
- if (class != IOPRIO_CLASS_BE) {
- ret = -ERANGE;
- break;
- }
-
- ret = ub_set_ioprio(who, data);
- break;
default:
ret = -EINVAL;
}
--
2.1.4
More information about the Devel
mailing list