From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>, Chris Mason <clm@fb.com>,
Josef Bacik <jbacik@fb.com>, David Sterba <dsterba@suse.cz>,
linux-btrfs@vger.kernel.org
Subject: [PATCH 2/2 linux-next] btrfs: use swap() in merge_ref()
Date: Mon, 18 May 2015 19:24:13 +0200 [thread overview]
Message-ID: <1431969853-14700-2-git-send-email-fabf@skynet.be> (raw)
In-Reply-To: <1431969853-14700-1-git-send-email-fabf@skynet.be>
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(-)
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;
--
2.4.0
next prev parent reply other threads:[~2015-05-18 17:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 17:24 [PATCH 1/2 linux-next] btrfs: use swap() in __merge_refs Fabian Frederick
2015-05-18 17:24 ` Fabian Frederick [this message]
2015-05-19 9:21 ` [PATCH 2/2 linux-next] btrfs: use swap() in merge_ref() David Sterba
2015-05-19 9:21 ` [PATCH 1/2 linux-next] btrfs: use swap() in __merge_refs David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431969853-14700-2-git-send-email-fabf@skynet.be \
--to=fabf@skynet.be \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).