add patch set-lazytime-on-remount
[ext4-patch-queue.git] / use-swap-in-mext_page_double_lock
blob7aabf0a372e96d5d4fcfbdd2faa9428c138e298f
1 ext4: use swap() in mext_page_double_lock()
3 From: Fabian Frederick <fabf@skynet.be>
5 Use kernel.h macro definition.
7 Thanks to Julia Lawall for Coccinelle scripting support.
9 Signed-off-by: Fabian Frederick <fabf@skynet.be>
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 ---
12  fs/ext4/move_extent.c | 9 +++------
13  1 file changed, 3 insertions(+), 6 deletions(-)
15 diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
16 index 370420b..8c04afb 100644
17 --- a/fs/ext4/move_extent.c
18 +++ b/fs/ext4/move_extent.c
19 @@ -166,12 +166,9 @@ mext_page_double_lock(struct inode *inode1, struct inode *inode2,
20          */
21         wait_on_page_writeback(page[0]);
22         wait_on_page_writeback(page[1]);
23 -       if (inode1 > inode2) {
24 -               struct page *tmp;
25 -               tmp = page[0];
26 -               page[0] = page[1];
27 -               page[1] = tmp;
28 -       }
29 +       if (inode1 > inode2)
30 +               swap(page[0], page[1]);
32         return 0;
33  }
35 -- 
36 2.4.2