diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-01-06 23:41:09 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 00:59:13 +0100 |
commit | ca8a5bd28226d62c045e0e55b42b9d10b146c205 (patch) | |
tree | ba770bf72dc0558c7009b7440a8c7a79abe45fa2 /fs/compat.c | |
parent | fs: fix name overwrite in __register_chrdev_region() (diff) | |
download | linux-ca8a5bd28226d62c045e0e55b42b9d10b146c205.tar.xz linux-ca8a5bd28226d62c045e0e55b42b9d10b146c205.zip |
add missing accounting calls to compat_sys_{readv,writev}
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/compat.c b/fs/compat.c index d1ece79b6411..30f2faa22f5c 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -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); out: + if (ret > 0) + add_rchar(current, ret); + inc_syscr(current); fput(file); return ret; } @@ -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); out: + if (ret > 0) + add_wchar(current, ret); + inc_syscw(current); fput(file); return ret; } |