projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
74f1ddf
)
unlock_return.cocci: Add vm_object_{hold,drop}().
author
Sascha Wildner <saw@online.de>
Thu, 16 Aug 2012 17:53:40 +0000 (19:53 +0200)
committer
Sascha Wildner <saw@online.de>
Sat, 18 Aug 2012 22:29:14 +0000 (
00:29
+0200)
test/cocci/unlock_return.cocci
patch
|
blob
|
blame
|
history
diff --git
a/test/cocci/unlock_return.cocci
b/test/cocci/unlock_return.cocci
index
6775567
..
1a8a392
100644
(file)
--- a/
test/cocci/unlock_return.cocci
+++ b/
test/cocci/unlock_return.cocci
@@
-119,3
+119,21
@@
if (...) { ... when != spin_unlock(l)
|
spin_unlock(l);
)
+
+// vm_object_hold(...) / vm_object_drop(...)
+//
+@@
+expression l;
+@@
+vm_object_hold(l);
+... when != vm_object_drop(l)
+ when any
+ when strict
+(
+if (...) { ... when != vm_object_drop(l)
++ vm_object_drop(l);
+ return ...;
+}
+|
+vm_object_drop(l);
+)