提交 ca8a5bd2 编写于 作者: G Gerd Hoffmann 提交者: Linus Torvalds

add missing accounting calls to compat_sys_{readv,writev}

Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8c401888
...@@ -1187,6 +1187,9 @@ compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec, unsign ...@@ -1187,6 +1187,9 @@ compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec, unsign
ret = compat_do_readv_writev(READ, file, vec, vlen, &file->f_pos); ret = compat_do_readv_writev(READ, file, vec, vlen, &file->f_pos);
out: out:
if (ret > 0)
add_rchar(current, ret);
inc_syscr(current);
fput(file); fput(file);
return ret; return ret;
} }
...@@ -1210,6 +1213,9 @@ compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec, unsig ...@@ -1210,6 +1213,9 @@ compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec, unsig
ret = compat_do_readv_writev(WRITE, file, vec, vlen, &file->f_pos); ret = compat_do_readv_writev(WRITE, file, vec, vlen, &file->f_pos);
out: out:
if (ret > 0)
add_wchar(current, ret);
inc_syscw(current);
fput(file); fput(file);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册