summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2017-10-10 12:48:05 +0200
committerDavid Sterba <dsterba@suse.com>2017-10-30 12:27:58 +0100
commita7e3c5f2f7ba3f1f413df5548ed51eb25cd1c74d (patch)
treecf147c85155ca9475d16b90a81ce77e3c1225a8e /fs/btrfs/super.c
parentbtrfs: prefix sysfs attribute struct names (diff)
downloadlinux-a7e3c5f2f7ba3f1f413df5548ed51eb25cd1c74d.tar.xz
linux-a7e3c5f2f7ba3f1f413df5548ed51eb25cd1c74d.zip
btrfs: use appropriate replacements for __sb_{start,end}_write calls
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> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f092fe057de7..770ac088dd9c 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);