Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74188
b: refs/heads/master
c: 483b23f
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 19, 2007
1 parent 1366860 commit 78f150d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b242e891c218162cfbae064b1a9136cdbed5ee53
refs/heads/master: 483b23ffa3a5f44767038b0a676d757e0668437e
8 changes: 2 additions & 6 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2888,18 +2888,14 @@ static int ip_rt_acct_read(char *buffer, char **start, off_t offset,
offset /= sizeof(u32);

if (length > 0) {
u32 *src = ((u32 *) IP_RT_ACCT_CPU(0)) + offset;
u32 *dst = (u32 *) buffer;

/* Copy first cpu. */
*start = buffer;
memcpy(dst, src, length);
memset(dst, 0, length);

/* Add the other cpus in, one int at a time */
for_each_possible_cpu(i) {
unsigned int j;

src = ((u32 *) IP_RT_ACCT_CPU(i)) + offset;
u32 *src = ((u32 *) IP_RT_ACCT_CPU(i)) + offset;

for (j = 0; j < length/4; j++)
dst[j] += src[j];
Expand Down

0 comments on commit 78f150d

Please sign in to comment.