From: Nikolay Borisov <n.borisov.lkml@gmail.com>
To: Rakesh Pandit <rakesh@tuxera.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>, Josef Bacik <jbacik@fb.com>,
Chris Mason <clm@fb.com>
Subject: Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls
Date: Tue, 10 Oct 2017 14:00:20 +0300 [thread overview]
Message-ID: <ec870392-1d3a-8d7e-746c-30d75e76b03e@gmail.com> (raw)
In-Reply-To: <20171010104803.GA33133@dhcp-216.srv.tuxera.com>
On 10.10.2017 13:48, Rakesh Pandit wrote:
> Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on
> frozen fs to avoid deadlock.") started using internal calls and we
> replace them with more suitable ones.
>
> Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
> ---
> fs/btrfs/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 35a128a..99c21ae 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -1205,8 +1205,8 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
> * happens. The pending operations are delayed to the
> * next commit after thawing.
> */
> - if (__sb_start_write(sb, SB_FREEZE_WRITE, false))
> - __sb_end_write(sb, SB_FREEZE_WRITE);
> + if (sb_start_write_trylock(sb))
> + sb_end_write(sb)
> else
> return 0;
> trans = btrfs_start_transaction(root, 0);
The non __ versions are just wrappers around the __ specific calls. So
the code is identical.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
next prev parent reply other threads:[~2017-10-10 11:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 10:48 [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls Rakesh Pandit
2017-10-10 11:00 ` Nikolay Borisov [this message]
2017-10-10 11:04 ` Rakesh Pandit
2017-10-10 11:08 ` Nikolay Borisov
2017-10-10 13:13 ` Rakesh Pandit
2017-10-10 13:20 ` 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=ec870392-1d3a-8d7e-746c-30d75e76b03e@gmail.com \
--to=n.borisov.lkml@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rakesh@tuxera.com \
/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).