Skip to content

Commit

Permalink
add missing accounting calls to compat_sys_{readv,writev}
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gerd Hoffmann authored and Linus Torvalds committed Jan 6, 2009
1 parent 8c40188 commit ca8a5bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit ca8a5bd

Please sign in to comment.