From: Miao Xie <miaox@cn.fujitsu.com>
To: Filipe David Borba Manana <fdmanana@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: don't ignore errors from btrfs_run_delayed_items
Date: Mon, 05 Aug 2013 10:21:44 +0800 [thread overview]
Message-ID: <51FF0C38.7060907@cn.fujitsu.com> (raw)
In-Reply-To: <1375662326-23444-1-git-send-email-fdmanana@gmail.com>
On mon, 5 Aug 2013 01:25:26 +0100, Filipe David Borba Manana wrote:
> tree-log.c was ignoring the return value from btrfs_run_delayed_items()
> in several places.
>
> Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
> ---
> fs/btrfs/tree-log.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index ff60d89..f919f26 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -747,7 +747,8 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
> ret = btrfs_unlink_inode(trans, root, dir, inode, name, name_len);
> if (ret)
> goto out;
> - btrfs_run_delayed_items(trans, root);
> + else
> + ret = btrfs_run_delayed_items(trans, root);
> out:
> kfree(name);
> iput(inode);
> @@ -923,7 +924,9 @@ again:
> kfree(victim_name);
> if (ret)
> return ret;
> - btrfs_run_delayed_items(trans, root);
> + ret = btrfs_run_delayed_items(trans, root);
> + if (ret)
> + return ret;
> *search_done = 1;
> goto again;
> }
> @@ -990,7 +993,8 @@ again:
> inode,
> victim_name,
> victim_name_len);
> - btrfs_run_delayed_items(trans, root);
> + if (!ret)
> + ret = btrfs_run_delayed_items(trans, root);
checkpatch.pl reported:
WARNING: line over 80 characters
#141: FILE: fs/btrfs/tree-log.c:997:
+ ret = btrfs_run_delayed_items(trans, root);
The other code is OK.
Thanks
Miao
> }
> iput(victim_parent);
> kfree(victim_name);
> @@ -1810,7 +1814,7 @@ again:
> ret = btrfs_unlink_inode(trans, root, dir, inode,
> name, name_len);
> if (!ret)
> - btrfs_run_delayed_items(trans, root);
> + ret = btrfs_run_delayed_items(trans, root);
> kfree(name);
> iput(inode);
> if (ret)
>
next prev parent reply other threads:[~2013-08-05 2:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 0:25 [PATCH] Btrfs: don't ignore errors from btrfs_run_delayed_items Filipe David Borba Manana
2013-08-05 2:21 ` Miao Xie [this message]
2013-08-05 8:25 ` [PATCH v2] " Filipe David Borba Manana
2013-08-05 8:45 ` Miao Xie
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=51FF0C38.7060907@cn.fujitsu.com \
--to=miaox@cn.fujitsu.com \
--cc=fdmanana@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.