From: Liu Bo <bo.li.liu@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 3/5] Btrfs: kill replicate code in replay_one_buffer
Date: Sun, 26 May 2013 21:50:29 +0800 [thread overview]
Message-ID: <1369576231-17836-4-git-send-email-bo.li.liu@oracle.com> (raw)
In-Reply-To: <1369576231-17836-1-git-send-email-bo.li.liu@oracle.com>
EXTREF is treated same as REF, so we can make the code tidy.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
fs/btrfs/tree-log.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index c276ac9..3f30053 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2016,13 +2016,8 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
eb, i, &key);
if (ret)
break;
- } else if (key.type == BTRFS_INODE_REF_KEY) {
- ret = add_inode_ref(wc->trans, root, log, path,
- eb, i, &key);
- if (ret && ret != -ENOENT)
- break;
- ret = 0;
- } else if (key.type == BTRFS_INODE_EXTREF_KEY) {
+ } else if (key.type == BTRFS_INODE_REF_KEY ||
+ key.type == BTRFS_INODE_EXTREF_KEY) {
ret = add_inode_ref(wc->trans, root, log, path,
eb, i, &key);
if (ret && ret != -ENOENT)
--
1.7.7
next prev parent reply other threads:[~2013-05-26 13:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-26 13:50 [PATCH 0/5] cleanup and fix Liu Bo
2013-05-26 13:50 ` [PATCH 1/5] Btrfs: fix use-after-free bug during umount Liu Bo
2013-05-27 12:07 ` David Sterba
2013-05-27 13:52 ` Liu Bo
2013-05-26 13:50 ` [PATCH 2/5] Btrfs: update new flags for tracepoint Liu Bo
2013-05-26 13:50 ` Liu Bo [this message]
2013-05-26 13:50 ` [PATCH 4/5 RESEND] Btrfs: remove unused code in btrfs_del_root Liu Bo
2013-05-26 13:50 ` [PATCH 5/5 RESEND] Btrfs: allow file data clone within a file Liu Bo
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=1369576231-17836-4-git-send-email-bo.li.liu@oracle.com \
--to=bo.li.liu@oracle.com \
--cc=linux-btrfs@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).