diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-06-13 19:31:45 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-06-15 16:27:19 -0400 |
commit | 05408b6f8fea54bf53e68a4ef24291214970f6d0 (patch) | |
tree | 2725db5979ad1f63314967741305ab0301c1f6d3 /libbcachefs/error.c | |
parent | c32bba1325cebd27e4dd3697a4b41ff0df59614f (diff) |
Update bcachefs sources to 4837f82ee1 bcachefs: Use cached iterators for alloc btree
Diffstat (limited to 'libbcachefs/error.c')
-rw-r--r-- | libbcachefs/error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbcachefs/error.c b/libbcachefs/error.c index 1662a362..cd46706f 100644 --- a/libbcachefs/error.c +++ b/libbcachefs/error.c @@ -37,7 +37,7 @@ void bch2_io_error_work(struct work_struct *work) struct bch_fs *c = ca->fs; bool dev; - mutex_lock(&c->state_lock); + down_write(&c->state_lock); dev = bch2_dev_state_allowed(c, ca, BCH_MEMBER_STATE_RO, BCH_FORCE_IF_DEGRADED); if (dev @@ -47,7 +47,7 @@ void bch2_io_error_work(struct work_struct *work) bch_err(ca, "too many IO errors, setting %s RO", dev ? "device" : "filesystem"); - mutex_unlock(&c->state_lock); + up_write(&c->state_lock); } void bch2_io_error(struct bch_dev *ca) |