summaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-08-22 06:54:27 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-22 19:52:45 +0200
commita44937fe4ef6a1190576492017939df636f4e38e (patch)
tree6828626a97c662516743fe747910942f13e7ed47 /fs/proc/base.c
parentproc: smaller readlock section in readdir("/proc") (diff)
downloadlinux-a44937fe4ef6a1190576492017939df636f4e38e.tar.xz
linux-a44937fe4ef6a1190576492017939df636f4e38e.zip
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>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index ad047977ed04..912a0306bb4d 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1366,10 +1366,8 @@ static ssize_t proc_fail_nth_read(struct file *file, char __user *buf,
if (!task)
return -ESRCH;
len = snprintf(numbuf, sizeof(numbuf), "%u\n", task->fail_nth);
- len = simple_read_from_buffer(buf, count, ppos, numbuf, len);
put_task_struct(task);
-
- return len;
+ return simple_read_from_buffer(buf, count, ppos, numbuf, len);
}
static const struct file_operations proc_fail_nth_operations = {