diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-11-18 03:34:44 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-11-18 03:34:44 -0500 |
commit | ec05a2311c35243cea08bca00bcf53a576ee41a2 (patch) | |
tree | b6feae6520bdeeb40f5c08e509b108d84199db7b /fs/proc | |
parent | a7a0aaa17ace589897021d668e09d474e7fc4c4d (diff) | |
parent | 5258f386ea4e8454bc801fb443e8a4217da1947c (diff) |
Merge branch 'sched/urgent' into sched/core
Merge in fixes before we queue up dependent bits, to avoid conflicts.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 144a96732dd7..5c1ad58c8028 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1165,81 +1165,6 @@ static const struct file_operations proc_pid_sched_operations = { | |||
1165 | 1165 | ||
1166 | #endif | 1166 | #endif |
1167 | 1167 | ||
1168 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
1169 | /* | ||
1170 | * Print out autogroup related information: | ||
1171 | */ | ||
1172 | static int sched_autogroup_show(struct seq_file *m, void *v) | ||
1173 | { | ||
1174 | struct inode *inode = m->private; | ||
1175 | struct task_struct *p; | ||
1176 | |||
1177 | p = get_proc_task(inode); | ||
1178 | if (!p) | ||
1179 | return -ESRCH; | ||
1180 | proc_sched_autogroup_show_task(p, m); | ||
1181 | |||
1182 | put_task_struct(p); | ||
1183 | |||
1184 | return 0; | ||
1185 | } | ||
1186 | |||
1187 | static ssize_t | ||
1188 | sched_autogroup_write(struct file *file, const char __user *buf, | ||
1189 | size_t count, loff_t *offset) | ||
1190 | { | ||
1191 | struct inode *inode = file->f_path.dentry->d_inode; | ||
1192 | struct task_struct *p; | ||
1193 | char buffer[PROC_NUMBUF]; | ||
1194 | int nice; | ||
1195 | int err; | ||
1196 | |||
1197 | memset(buffer, 0, sizeof(buffer)); | ||
1198 | if (count > sizeof(buffer) - 1) | ||
1199 | count = sizeof(buffer) - 1; | ||
1200 | if (copy_from_user(buffer, buf, count)) | ||
1201 | return -EFAULT; | ||
1202 | |||
1203 | err = kstrtoint(strstrip(buffer), 0, &nice); | ||
1204 | if (err < 0) | ||
1205 | return err; | ||
1206 | |||
1207 | p = get_proc_task(inode); | ||
1208 | if (!p) | ||
1209 | return -ESRCH; | ||
1210 | |||
1211 | err = proc_sched_autogroup_set_nice(p, nice); | ||
1212 | if (err) | ||
1213 | count = err; | ||
1214 | |||
1215 | put_task_struct(p); | ||
1216 | |||
1217 | return count; | ||
1218 | } | ||
1219 | |||
1220 | static int sched_autogroup_open(struct inode *inode, struct file *filp) | ||
1221 | { | ||
1222 | int ret; | ||
1223 | |||
1224 | ret = single_open(filp, sched_autogroup_show, NULL); | ||
1225 | if (!ret) { | ||
1226 | struct seq_file *m = filp->private_data; | ||
1227 | |||
1228 | m->private = inode; | ||
1229 | } | ||
1230 | return ret; | ||
1231 | } | ||
1232 | |||
1233 | static const struct file_operations proc_pid_sched_autogroup_operations = { | ||
1234 | .open = sched_autogroup_open, | ||
1235 | .read = seq_read, | ||
1236 | .write = sched_autogroup_write, | ||
1237 | .llseek = seq_lseek, | ||
1238 | .release = single_release, | ||
1239 | }; | ||
1240 | |||
1241 | #endif /* CONFIG_SCHED_AUTOGROUP */ | ||
1242 | |||
1243 | static ssize_t comm_write(struct file *file, const char __user *buf, | 1168 | static ssize_t comm_write(struct file *file, const char __user *buf, |
1244 | size_t count, loff_t *offset) | 1169 | size_t count, loff_t *offset) |
1245 | { | 1170 | { |
@@ -2550,9 +2475,6 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
2550 | #ifdef CONFIG_SCHED_DEBUG | 2475 | #ifdef CONFIG_SCHED_DEBUG |
2551 | REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), | 2476 | REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), |
2552 | #endif | 2477 | #endif |
2553 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
2554 | REG("autogroup", S_IRUGO|S_IWUSR, proc_pid_sched_autogroup_operations), | ||
2555 | #endif | ||
2556 | REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations), | 2478 | REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations), |
2557 | #ifdef CONFIG_HAVE_ARCH_TRACEHOOK | 2479 | #ifdef CONFIG_HAVE_ARCH_TRACEHOOK |
2558 | INF("syscall", S_IRUGO, proc_pid_syscall), | 2480 | INF("syscall", S_IRUGO, proc_pid_syscall), |