aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-08-29 03:17:41 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:31:18 -0400
commitcf342e52e3117391868fb4bd900ce772a27a5a1a (patch)
tree4e9d48d0680bfd8dc90de645c891a6fa47931fdd /fs
parent25034d7a83cf77667f3d65822484b305d4be6b25 (diff)
[PATCH] Don't need to disable interrupts for tasklist_lock
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/ioprio.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 0fd1089d7bf6..03dc4f269b76 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -81,7 +81,12 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
81 } 81 }
82 82
83 ret = -ESRCH; 83 ret = -ESRCH;
84 read_lock_irq(&tasklist_lock); 84 /*
85 * We want IOPRIO_WHO_PGRP/IOPRIO_WHO_USER to be "atomic",
86 * so we can't use rcu_read_lock(). See re-copy of ->ioprio
87 * in copy_process().
88 */
89 read_lock(&tasklist_lock);
85 switch (which) { 90 switch (which) {
86 case IOPRIO_WHO_PROCESS: 91 case IOPRIO_WHO_PROCESS:
87 if (!who) 92 if (!who)
@@ -124,7 +129,7 @@ free_uid:
124 ret = -EINVAL; 129 ret = -EINVAL;
125 } 130 }
126 131
127 read_unlock_irq(&tasklist_lock); 132 read_unlock(&tasklist_lock);
128 return ret; 133 return ret;
129} 134}
130 135
@@ -170,7 +175,7 @@ asmlinkage long sys_ioprio_get(int which, int who)
170 int ret = -ESRCH; 175 int ret = -ESRCH;
171 int tmpio; 176 int tmpio;
172 177
173 read_lock_irq(&tasklist_lock); 178 read_lock(&tasklist_lock);
174 switch (which) { 179 switch (which) {
175 case IOPRIO_WHO_PROCESS: 180 case IOPRIO_WHO_PROCESS:
176 if (!who) 181 if (!who)
@@ -221,7 +226,7 @@ asmlinkage long sys_ioprio_get(int which, int who)
221 ret = -EINVAL; 226 ret = -EINVAL;
222 } 227 }
223 228
224 read_unlock_irq(&tasklist_lock); 229 read_unlock(&tasklist_lock);
225 return ret; 230 return ret;
226} 231}
227 232