diff options
Diffstat (limited to 'fs/bcachefs/error.h')
| -rw-r--r-- | fs/bcachefs/error.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/bcachefs/error.h b/fs/bcachefs/error.h index a57b9f18d060..7d3f0e2a5fd6 100644 --- a/fs/bcachefs/error.h +++ b/fs/bcachefs/error.h @@ -226,8 +226,13 @@ static inline void bch2_account_io_success_fail(struct bch_dev *ca, enum bch_member_error_type type, bool success) { - if (!success) + if (likely(success)) { + if (type == BCH_MEMBER_ERROR_write && + ca->write_errors_start) + ca->write_errors_start = 0; + } else { bch2_io_error(ca, type); + } } static inline void bch2_account_io_completion(struct bch_dev *ca, |
