Skip to content

Commit

Permalink
ext4: use swap() in mext_page_double_lock()
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Fabian Frederick authored and Theodore Ts'o committed Jun 13, 2015
1 parent 4b7e2db commit bf86546
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions fs/ext4/move_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,9 @@ mext_page_double_lock(struct inode *inode1, struct inode *inode2,
*/
wait_on_page_writeback(page[0]);
wait_on_page_writeback(page[1]);
if (inode1 > inode2) {
struct page *tmp;
tmp = page[0];
page[0] = page[1];
page[1] = tmp;
}
if (inode1 > inode2)
swap(page[0], page[1]);

return 0;
}

Expand Down

0 comments on commit bf86546

Please sign in to comment.