diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-25 01:55:26 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 02:49:40 +0200 |
commit | 2a28f98c49dd19c4ea54c4ba6ecdc4041efbd73c (patch) | |
tree | 24f9848fc2bb82eb9def348450ca7b8680302fe1 /fs/ocfs2/dir.c | |
parent | ocfs2: fix wrong check in ocfs2_direct_IO_get_blocks (diff) | |
download | linux-2a28f98c49dd19c4ea54c4ba6ecdc4041efbd73c.tar.xz linux-2a28f98c49dd19c4ea54c4ba6ecdc4041efbd73c.zip |
ocfs2: use swap() in dx_leaf_sort_swap()
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/ocfs2/dir.c')
-rw-r--r-- | fs/ocfs2/dir.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index a7f01f3cdda1..02878a83f0b4 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -3543,13 +3543,10 @@ static void dx_leaf_sort_swap(void *a, void *b, int size) { struct ocfs2_dx_entry *entry1 = a; struct ocfs2_dx_entry *entry2 = b; - struct ocfs2_dx_entry tmp; BUG_ON(size != sizeof(*entry1)); - tmp = *entry1; - *entry1 = *entry2; - *entry2 = tmp; + swap(*entry1, *entry2); } static int ocfs2_dx_leaf_same_major(struct ocfs2_dx_leaf *dx_leaf) |