aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/res_counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/res_counter.h')
-rw-r--r--include/linux/res_counter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
index 629d0ea2d073..6d9e1fca098c 100644
--- a/include/linux/res_counter.h
+++ b/include/linux/res_counter.h
@@ -143,4 +143,12 @@ static inline void res_counter_reset_max(struct res_counter *cnt)
143 spin_unlock_irqrestore(&cnt->lock, flags); 143 spin_unlock_irqrestore(&cnt->lock, flags);
144} 144}
145 145
146static inline void res_counter_reset_failcnt(struct res_counter *cnt)
147{
148 unsigned long flags;
149
150 spin_lock_irqsave(&cnt->lock, flags);
151 cnt->failcnt = 0;
152 spin_unlock_irqrestore(&cnt->lock, flags);
153}
146#endif 154#endif