Commit 7a501609 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

mconsole_proc(): don't mess with file->f_pos

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 878e66d0
......@@ -130,6 +130,7 @@ void mconsole_proc(struct mc_request *req)
struct file *file;
int first_chunk = 1;
char *ptr = req->request.data;
loff_t pos = 0;
ptr += strlen("proc");
ptr = skip_spaces(ptr);
......@@ -148,7 +149,7 @@ void mconsole_proc(struct mc_request *req)
}
do {
len = kernel_read(file, buf, PAGE_SIZE - 1, &file->f_pos);
len = kernel_read(file, buf, PAGE_SIZE - 1, &pos);
if (len < 0) {
mconsole_reply(req, "Read of file failed", 1, 0);
goto out_free;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment