From: Gerd Hoffmann Date: Tue, 6 Jan 2009 22:41:09 +0000 (-0800) Subject: add missing accounting calls to compat_sys_{readv,writev} X-Git-Tag: v2.6.29-rc1~364 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ca8a5bd28226d62c045e0e55b42b9d10b146c205;p=linux-2.6-omap-h63xx.git add missing accounting calls to compat_sys_{readv,writev} Signed-off-by: Gerd Hoffmann Cc: Jay Lan Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/compat.c b/fs/compat.c index d1ece79b641..30f2faa22f5 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; }