* [PATCH 1/1 linux-next] ext4: use swap() in mext_page_double_lock()
@ 2015-06-12 16:59 Fabian Frederick
2015-06-15 4:05 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2015-06-12 16:59 UTC (permalink / raw)
To: linux-kernel
Cc: Julia Lawall, Fabian Frederick, Theodore Ts'o,
Andreas Dilger, linux-ext4
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/ext4/move_extent.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 370420b..8c04afb 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;
}
--
2.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1 linux-next] ext4: use swap() in mext_page_double_lock()
2015-06-12 16:59 [PATCH 1/1 linux-next] ext4: use swap() in mext_page_double_lock() Fabian Frederick
@ 2015-06-15 4:05 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2015-06-15 4:05 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, Julia Lawall, Andreas Dilger, linux-ext4
On Fri, Jun 12, 2015 at 06:59:15PM +0200, Fabian Frederick wrote:
> Use kernel.h macro definition.
>
> Thanks to Julia Lawall for Coccinelle scripting support.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-15 4:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 16:59 [PATCH 1/1 linux-next] ext4: use swap() in mext_page_double_lock() Fabian Frederick
2015-06-15 4:05 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).