Skip to content

Commit

Permalink
ocfs2: use swap() in dx_leaf_sort_swap()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and Linus Torvalds committed Jun 25, 2015
1 parent ae1f081 commit 2a28f98
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/ocfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2a28f98

Please sign in to comment.