summaryrefslogtreecommitdiff
path: root/patches/lib-refcount.patch
blob: 020b9af2ade510a17529a33a8d52ace014f1ae2a (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
@@ -353,6 +354,8 @@ bool refcount_dec_and_lock(refcount_t *r
 		return false;
 	}
 
+	__release(lock);
+
 	return true;
 }
 EXPORT_SYMBOL(refcount_dec_and_lock);
@@ -382,6 +385,8 @@ bool refcount_dec_and_lock_irqsave(refco
 		return false;
 	}
 
+	__release(lock);
+
 	return true;
 }
 EXPORT_SYMBOL(refcount_dec_and_lock_irqsave);