diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/res_counter.h | 8 |
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) 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 |