misc: therm_est: Robustify history management
[linux-2.6.git] / drivers / misc / uid_stat.c
index e6760b5..2141124 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/spinlock.h>
 #include <linux/stat.h>
 #include <linux/uid_stat.h>
+#include <net/activity_stats.h>
 
 static DEFINE_SPINLOCK(uid_lock);
 static LIST_HEAD(uid_list);
@@ -122,6 +123,7 @@ static struct uid_stat *create_stat(uid_t uid) {
 
 int uid_stat_tcp_snd(uid_t uid, int size) {
        struct uid_stat *entry;
+       activity_stats_update();
        if ((entry = find_uid_stat(uid)) == NULL &&
                ((entry = create_stat(uid)) == NULL)) {
                        return -1;
@@ -132,6 +134,7 @@ int uid_stat_tcp_snd(uid_t uid, int size) {
 
 int uid_stat_tcp_rcv(uid_t uid, int size) {
        struct uid_stat *entry;
+       activity_stats_update();
        if ((entry = find_uid_stat(uid)) == NULL &&
                ((entry = create_stat(uid)) == NULL)) {
                        return -1;