summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-03-17 16:49:59 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:18 -0400
commit7c648fe8991a267886b262e8988546ec87ad926e (patch)
tree331c4b05590bdc515e2c76ea07c3536f303ff614 /fs
parent4d8100daa9bb6c243cd39be0956005a76eec36ee (diff)
downloadlinux-stable-7c648fe8991a267886b262e8988546ec87ad926e.tar.gz
linux-stable-7c648fe8991a267886b262e8988546ec87ad926e.tar.bz2
linux-stable-7c648fe8991a267886b262e8988546ec87ad926e.zip
bcachefs: Fix a deadlock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/migrate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/migrate.c b/fs/bcachefs/migrate.c
index 955831a50824..38bf75b6bc2d 100644
--- a/fs/bcachefs/migrate.c
+++ b/fs/bcachefs/migrate.c
@@ -96,11 +96,11 @@ static int bch2_dev_usrdata_drop(struct bch_fs *c, unsigned dev_idx, int flags)
break;
}
+ bch2_trans_exit(&trans);
+
bch2_replicas_gc_end(c, ret);
mutex_unlock(&c->replicas_gc_lock);
- bch2_trans_exit(&trans);
-
return ret;
}