proc: put task earlier in /proc/*/fail-nth
Link: http://lkml.kernel.org/r/20180627195427.GE18113@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
8d48b2e044
commit
a44937fe4e
@ -1366,10 +1366,8 @@ static ssize_t proc_fail_nth_read(struct file *file, char __user *buf,
|
|||||||
if (!task)
|
if (!task)
|
||||||
return -ESRCH;
|
return -ESRCH;
|
||||||
len = snprintf(numbuf, sizeof(numbuf), "%u\n", task->fail_nth);
|
len = snprintf(numbuf, sizeof(numbuf), "%u\n", task->fail_nth);
|
||||||
len = simple_read_from_buffer(buf, count, ppos, numbuf, len);
|
|
||||||
put_task_struct(task);
|
put_task_struct(task);
|
||||||
|
return simple_read_from_buffer(buf, count, ppos, numbuf, len);
|
||||||
return len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct file_operations proc_fail_nth_operations = {
|
static const struct file_operations proc_fail_nth_operations = {
|
||||||
|
Loading…
Reference in New Issue
Block a user