diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-12-13 03:29:52 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-12-13 03:29:52 -0500 |
commit | 354d14b3f53cc749c5d26d4ba7280d1e931d6bc4 (patch) | |
tree | 59b597e44902d8db8bde7deac1e7e707327c6fe6 /fs/ioprio.c | |
parent | 5144c534d16529bc469396211131e8935589f833 (diff) | |
parent | 5b84ba26a9672e615897234fa5efd3eea2d6b295 (diff) |
Merge branch 'topic/workq-update' into topic/misc
Diffstat (limited to 'fs/ioprio.c')
-rw-r--r-- | fs/ioprio.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c index 748cfb92dcc6..7da2a06508e5 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c | |||
@@ -103,12 +103,7 @@ SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio) | |||
103 | } | 103 | } |
104 | 104 | ||
105 | ret = -ESRCH; | 105 | ret = -ESRCH; |
106 | /* | 106 | rcu_read_lock(); |
107 | * We want IOPRIO_WHO_PGRP/IOPRIO_WHO_USER to be "atomic", | ||
108 | * so we can't use rcu_read_lock(). See re-copy of ->ioprio | ||
109 | * in copy_process(). | ||
110 | */ | ||
111 | read_lock(&tasklist_lock); | ||
112 | switch (which) { | 107 | switch (which) { |
113 | case IOPRIO_WHO_PROCESS: | 108 | case IOPRIO_WHO_PROCESS: |
114 | if (!who) | 109 | if (!who) |
@@ -153,7 +148,7 @@ free_uid: | |||
153 | ret = -EINVAL; | 148 | ret = -EINVAL; |
154 | } | 149 | } |
155 | 150 | ||
156 | read_unlock(&tasklist_lock); | 151 | rcu_read_unlock(); |
157 | return ret; | 152 | return ret; |
158 | } | 153 | } |
159 | 154 | ||
@@ -197,7 +192,7 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who) | |||
197 | int ret = -ESRCH; | 192 | int ret = -ESRCH; |
198 | int tmpio; | 193 | int tmpio; |
199 | 194 | ||
200 | read_lock(&tasklist_lock); | 195 | rcu_read_lock(); |
201 | switch (which) { | 196 | switch (which) { |
202 | case IOPRIO_WHO_PROCESS: | 197 | case IOPRIO_WHO_PROCESS: |
203 | if (!who) | 198 | if (!who) |
@@ -250,6 +245,6 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who) | |||
250 | ret = -EINVAL; | 245 | ret = -EINVAL; |
251 | } | 246 | } |
252 | 247 | ||
253 | read_unlock(&tasklist_lock); | 248 | rcu_read_unlock(); |
254 | return ret; | 249 | return ret; |
255 | } | 250 | } |