diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-12 23:47:33 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-06-12 23:47:33 -0400 |
commit | bf86546760502b24e16fad75e3affde61efb5e2c (patch) | |
tree | 26e362d1e5db3bed876368dc05f4cc0bd2f91b92 /fs/ext4/move_extent.c | |
parent | 4b7e2db5c08ca3d9f3b75b2a46f53c358ea55540 (diff) |
ext4: use swap() in mext_page_double_lock()
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>
Diffstat (limited to 'fs/ext4/move_extent.c')
-rw-r--r-- | fs/ext4/move_extent.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 370420bfae8d..8c04afb90b1b 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -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; } |