RDS: update copy_to_user state in tcp transport
authorAndy Grover <andy.grover@oracle.com>
Thu, 11 Mar 2010 13:49:57 +0000 (13:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Mar 2010 04:16:54 +0000 (21:16 -0700)
Other transports use rds_page_copy_user, which updates our
s_copy_to_user counter. TCP doesn't, so it needs to explicity
call rds_stats_add().

Reported-by: Richard Frank <richard.frank@oracle.com>
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/tcp_recv.c

index c00dafffbb5acf3d844716b49d5fe434e710d006..40bfcf88746535927fd9e2ec93d3ada3305db126 100644 (file)
@@ -97,6 +97,7 @@ int rds_tcp_inc_copy_to_user(struct rds_incoming *inc, struct iovec *first_iov,
                                goto out;
                        }
 
+                       rds_stats_add(s_copy_to_user, to_copy);
                        size -= to_copy;
                        ret += to_copy;
                        skb_off += to_copy;