]> err.no Git - linux-2.6/blobdiff - include/linux/res_counter.h
drm/radeon: merge IGP chip setup and fixup RS400 vs RS480 support
[linux-2.6] / include / linux / res_counter.h
index df8085acba16017f6e1a5da5852d21b0f936cccc..6d9e1fca098c468b49287791e181f6e4f51e7d54 100644 (file)
@@ -9,6 +9,8 @@
  *
  * Author: Pavel Emelianov <xemul@openvz.org>
  *
+ * See Documentation/controllers/resource_counter.txt for more
+ * info about what this counter is.
  */
 
 #include <linux/cgroup.h>
@@ -141,4 +143,12 @@ static inline void res_counter_reset_max(struct res_counter *cnt)
        spin_unlock_irqrestore(&cnt->lock, flags);
 }
 
+static inline void res_counter_reset_failcnt(struct res_counter *cnt)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&cnt->lock, flags);
+       cnt->failcnt = 0;
+       spin_unlock_irqrestore(&cnt->lock, flags);
+}
 #endif