From: Rakesh Pandit <rakesh@tuxera.com>
To: <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: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls
Date: Tue, 10 Oct 2017 13:48:05 +0300 [thread overview]
Message-ID: <20171010104803.GA33133@dhcp-216.srv.tuxera.com> (raw)
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);
--
2.5.5
next reply other threads:[~2017-10-10 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 10:48 Rakesh Pandit [this message]
2017-10-10 11:00 ` [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls Nikolay Borisov
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=20171010104803.GA33133@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 \
/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).