linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: Josef Bacik <jbacik@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: release both paths before logging dir/changed extents
Date: Tue, 23 Jul 2013 10:03:58 +0800	[thread overview]
Message-ID: <51EDE48E.3010302@cn.fujitsu.com> (raw)
In-Reply-To: <1374512160-1888-1-git-send-email-jbacik@fusionio.com>

On mon, 22 Jul 2013 12:56:00 -0400, Josef Bacik wrote:
> The ceph guys tripped over this bug where we were still holding onto the
> original path that we used to copy the inode with when logging.  This is based
> on Chris's fix which was reported to fix the problem.  We need to drop the paths
> in two cases anyway so just move the drop up so that we don't have duplicate
> code.  Thanks,
> 
> Signed-off-by: Josef Bacik <jbacik@fusionio.com>

Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>

> ---
>  fs/btrfs/tree-log.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index 2c67914..ff60d89 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -3746,8 +3746,9 @@ next_slot:
>  	}
>  
>  log_extents:
> +	btrfs_release_path(path);
> +	btrfs_release_path(dst_path);
>  	if (fast_search) {
> -		btrfs_release_path(dst_path);
>  		ret = btrfs_log_changed_extents(trans, root, inode, dst_path);
>  		if (ret) {
>  			err = ret;
> @@ -3764,8 +3765,6 @@ log_extents:
>  	}
>  
>  	if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {
> -		btrfs_release_path(path);
> -		btrfs_release_path(dst_path);
>  		ret = log_directory_changes(trans, root, inode, path, dst_path);
>  		if (ret) {
>  			err = ret;
> 


      reply	other threads:[~2013-07-23  2:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22 16:56 [PATCH] Btrfs: release both paths before logging dir/changed extents Josef Bacik
2013-07-23  2:03 ` Miao Xie [this message]

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=51EDE48E.3010302@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=jbacik@fusionio.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).