bcachefs: Fix a deadlock

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2019-03-17 16:49:59 -04:00 committed by Kent Overstreet
parent 4d8100daa9
commit 7c648fe899

View file

@ -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;
}