mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
4b7e2db5c0
commit
bf86546760
|
@ -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[0]);
|
||||||
wait_on_page_writeback(page[1]);
|
wait_on_page_writeback(page[1]);
|
||||||
if (inode1 > inode2) {
|
if (inode1 > inode2)
|
||||||
struct page *tmp;
|
swap(page[0], page[1]);
|
||||||
tmp = page[0];
|
|
||||||
page[0] = page[1];
|
|
||||||
page[1] = tmp;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue