From: Rakesh Pandit <rakesh@tuxera.com>
To: Nikolay Borisov <n.borisov.lkml@gmail.com>
Cc: <linux-btrfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
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:04:18 +0300 [thread overview]
Message-ID: <20171010110418.GA33174@dhcp-216.srv.tuxera.com> (raw)
In-Reply-To: <ec870392-1d3a-8d7e-746c-30d75e76b03e@gmail.com>
On Tue, Oct 10, 2017 at 02:00:20PM +0300, Nikolay Borisov wrote:
>
>
> 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>
>
Thanks, yes indeed.
next prev parent reply other threads:[~2017-10-10 11:04 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
2017-10-10 11:04 ` Rakesh Pandit [this message]
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=20171010110418.GA33174@dhcp-216.srv.tuxera.com \
--to=rakesh@tuxera.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=n.borisov.lkml@gmail.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).