提交 a7e3c5f2 编写于 作者: R Rakesh Pandit 提交者: David Sterba

btrfs: use appropriate replacements for __sb_{start,end}_write calls

Commit a53f4f8e ("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: NRakesh Pandit <rakesh@tuxera.com>
Reviewed-by: NNikolay Borisov <nborisov@suse.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 a969f4cc
...@@ -1205,8 +1205,8 @@ int btrfs_sync_fs(struct super_block *sb, int wait) ...@@ -1205,8 +1205,8 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
* happens. The pending operations are delayed to the * happens. The pending operations are delayed to the
* next commit after thawing. * next commit after thawing.
*/ */
if (__sb_start_write(sb, SB_FREEZE_WRITE, false)) if (sb_start_write_trylock(sb))
__sb_end_write(sb, SB_FREEZE_WRITE); sb_end_write(sb);
else else
return 0; return 0;
trans = btrfs_start_transaction(root, 0); trans = btrfs_start_transaction(root, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册