summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-06-24 16:55:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-24 17:49:40 -0700
commita612543fd189d5694a1b0d526369fab8827f7045 (patch)
tree488b7ca294d4e818725713b79d3b04f643f349f2 /fs
parent2a28f98c49dd19c4ea54c4ba6ecdc4041efbd73c (diff)
ocfs2: use swap() in swap_refcount_rec()
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/refcounttree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index d8c6af101f3f..b69dd14c0b9b 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -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);
}
/*