All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: optimize code converge mutex unlock
Date: Wed, 20 Dec 2017 10:19:14 +0200	[thread overview]
Message-ID: <fdc6d2aa-12ee-c6ff-c997-a68232aac37b@suse.com> (raw)
In-Reply-To: <20171220064226.4317-1-anand.jain@oracle.com>



On 20.12.2017 08:42, Anand Jain wrote:
> No functional change rearrange the mutex_unlock.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  fs/btrfs/transaction.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
> index 6348573e26a7..04f07144b45c 100644
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@ -2265,16 +2265,13 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
>  	}
>  
>  	ret = write_all_supers(fs_info, 0);
> -	if (ret) {
> -		mutex_unlock(&fs_info->tree_log_mutex);
> -		goto scrub_continue;
> -	}
> -
>  	/*
>  	 * the super is written, we can safely allow the tree-loggers
>  	 * to go about their business
>  	 */
>  	mutex_unlock(&fs_info->tree_log_mutex);
> +	if (ret)
> +		goto scrub_continue;
>  
>  	btrfs_finish_extent_commit(trans, fs_info);
>  
> 

  reply	other threads:[~2017-12-20  8:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  6:42 [PATCH] btrfs: optimize code converge mutex unlock Anand Jain
2017-12-20  8:19 ` Nikolay Borisov [this message]
2018-01-05 13:12   ` 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=fdc6d2aa-12ee-c6ff-c997-a68232aac37b@suse.com \
    --to=nborisov@suse.com \
    --cc=anand.jain@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 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.