summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-06-12 23:47:33 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-06-12 23:47:33 -0400
commitbf86546760502b24e16fad75e3affde61efb5e2c (patch)
tree26e362d1e5db3bed876368dc05f4cc0bd2f91b92 /fs/ext4
parent4b7e2db5c08ca3d9f3b75b2a46f53c358ea55540 (diff)
downloadblackbird-op-linux-bf86546760502b24e16fad75e3affde61efb5e2c.tar.gz
blackbird-op-linux-bf86546760502b24e16fad75e3affde61efb5e2c.zip
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')
-rw-r--r--fs/ext4/move_extent.c9
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;
}
OpenPOWER on IntegriCloud