summaryrefslogtreecommitdiff
path: root/patches/lib-refcount.patch
blob: 0f63ec6aa6d959e41aabf91bcdd37e37e7400ac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/compat/lib-refcount.c b/compat/lib-refcount.c
index 5d0582a..8d108f9 100644
--- a/compat/lib-refcount.c
+++ b/compat/lib-refcount.c
@@ -42,6 +42,7 @@
 #include <linux/refcount.h>
 #include <linux/spinlock.h>
 #include <linux/bug.h>
+#include <linux/export.h>
 
 /**
  * refcount_add_not_zero_checked - add a value to a refcount unless it is 0
@@ -153,6 +153,8 @@ bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock)
 		return false;
 	}
 
+	__release(lock);
+
 	return true;
 }
 EXPORT_SYMBOL(refcount_dec_and_lock);
@@ -182,6 +184,8 @@ bool refcount_dec_and_lock_irqsave(refcount_t *r, spinlock_t *lock,
 		return false;
 	}
 
+	__release(lock);
+
 	return true;
 }
 EXPORT_SYMBOL(refcount_dec_and_lock_irqsave);