Commit cf342e52e3117391868fb4bd900ce772a27a5a1a
Committed by
Jens Axboe
1 parent
25034d7a83
Exists in
master
and in
20 other branches
[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>
Showing 1 changed file with 9 additions and 4 deletions Side-by-side Diff
fs/ioprio.c
... | ... | @@ -81,7 +81,12 @@ |
81 | 81 | } |
82 | 82 | |
83 | 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 | 90 | switch (which) { |
86 | 91 | case IOPRIO_WHO_PROCESS: |
87 | 92 | if (!who) |
... | ... | @@ -124,7 +129,7 @@ |
124 | 129 | ret = -EINVAL; |
125 | 130 | } |
126 | 131 | |
127 | - read_unlock_irq(&tasklist_lock); | |
132 | + read_unlock(&tasklist_lock); | |
128 | 133 | return ret; |
129 | 134 | } |
130 | 135 | |
... | ... | @@ -170,7 +175,7 @@ |
170 | 175 | int ret = -ESRCH; |
171 | 176 | int tmpio; |
172 | 177 | |
173 | - read_lock_irq(&tasklist_lock); | |
178 | + read_lock(&tasklist_lock); | |
174 | 179 | switch (which) { |
175 | 180 | case IOPRIO_WHO_PROCESS: |
176 | 181 | if (!who) |
... | ... | @@ -221,7 +226,7 @@ |
221 | 226 | ret = -EINVAL; |
222 | 227 | } |
223 | 228 | |
224 | - read_unlock_irq(&tasklist_lock); | |
229 | + read_unlock(&tasklist_lock); | |
225 | 230 | return ret; |
226 | 231 | } |