[2/2,linux-next] btrfs: use swap() in merge_ref()
diff mbox

Message ID 1431969853-14700-2-git-send-email-fabf@skynet.be
State New
Headers show

Commit Message

Fabian Frederick May 18, 2015, 5:24 p.m. UTC
Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/btrfs/delayed-ref.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

David Sterba May 19, 2015, 9:21 a.m. UTC | #1
On Mon, May 18, 2015 at 07:24:13PM +0200, Fabian Frederick wrote:
> Use kernel.h macro definition.
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Reviewed-by: David Sterba <dsterba@suse.cz>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 8f8ed7d..97c5a19 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -301,11 +301,7 @@  static int merge_ref(struct btrfs_trans_handle *trans,
 			mod = next->ref_mod;
 		} else {
 			if (ref->ref_mod < next->ref_mod) {
-				struct btrfs_delayed_ref_node *tmp;
-
-				tmp = ref;
-				ref = next;
-				next = tmp;
+				swap(ref, next);
 				done = 1;
 			}
 			mod = -next->ref_mod;