ocfs2: use swap() in swap_refcount_rec()
authorFabian Frederick <fabf@skynet.be>
Wed, 24 Jun 2015 23:55:29 +0000 (16:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Jun 2015 00:49:40 +0000 (17:49 -0700)
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/refcounttree.c

index d8c6af101f3ff79ebb59589cdafab63a3f3c8f95..b69dd14c0b9ba1e39aa7662aec0350e8b5044702 100644 (file)
@@ -1406,11 +1406,9 @@ static int cmp_refcount_rec_by_cpos(const void *a, const void *b)
 
 static void swap_refcount_rec(void *a, void *b, int size)
 {
-       struct ocfs2_refcount_rec *l = a, *r = b, tmp;
+       struct ocfs2_refcount_rec *l = a, *r = b;
 
-       tmp = *l;
-       *l = *r;
-       *r = tmp;
+       swap(*l, *r);
 }
 
 /*