summaryrefslogtreecommitdiff
path: root/libbcachefs/super.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-03-02 17:10:54 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2020-03-02 17:10:54 -0500
commit2d238045d3a7262c4ba58da7eeedbc4a0df5b59f (patch)
tree8831965bc5bbc3200ab573b4e689ba3ab75877d1 /libbcachefs/super.c
parent14e736e62757706afd6f451118cad7f34e5766da (diff)
Update bcachefs sources to 4a4139a563 bcachefs: Fix extent_sort_fix_overlapping()
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r--libbcachefs/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c
index fb1a230..b990c16 100644
--- a/libbcachefs/super.c
+++ b/libbcachefs/super.c
@@ -549,6 +549,10 @@ void bch2_fs_stop(struct bch_fs *c)
cancel_work_sync(&c->journal_seq_blacklist_gc_work);
+ mutex_lock(&c->state_lock);
+ bch2_fs_read_only(c);
+ mutex_unlock(&c->state_lock);
+
for_each_member_device(ca, c, i)
if (ca->kobj.state_in_sysfs &&
ca->disk_sb.bdev)
@@ -572,10 +576,6 @@ void bch2_fs_stop(struct bch_fs *c)
closure_sync(&c->cl);
closure_debug_destroy(&c->cl);
- mutex_lock(&c->state_lock);
- bch2_fs_read_only(c);
- mutex_unlock(&c->state_lock);
-
/* btree prefetch might have kicked off reads in the background: */
bch2_btree_flush_all_reads(c);