[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Oct 2017 13:48:05 +0300
From: Rakesh Pandit <rakesh@...era.com>
To: <linux-btrfs@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: David Sterba <dsterba@...e.com>, Josef Bacik <jbacik@...com>,
Chris Mason <clm@...com>
Subject: [PATCH] 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@...era.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
Powered by blists - more mailing lists