summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_locking.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/btree_locking.c')
-rw-r--r--fs/bcachefs/btree_locking.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c
index 1f4eca898ab7..23a6d63223af 100644
--- a/fs/bcachefs/btree_locking.c
+++ b/fs/bcachefs/btree_locking.c
@@ -736,11 +736,8 @@ bool bch2_trans_locked(struct btree_trans *trans)
int __bch2_trans_mutex_lock(struct btree_trans *trans,
struct mutex *lock)
{
- int ret;
+ int ret = drop_locks_do(trans, (mutex_lock(lock), 0));
- bch2_trans_unlock(trans);
- mutex_lock(lock);
- ret = bch2_trans_relock(trans);
if (ret)
mutex_unlock(lock);
return ret;