[#1906] writecache: Do not require read-only mode in Flush

It was needed before we started to flush during transition to
`degraded` mode. Now it is confusing.

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-11-08 15:20:58 +03:00 committed by fyrchik
parent aa478f1def
commit b0e94b6a6b
4 changed files with 2 additions and 13 deletions

View file

@ -261,10 +261,6 @@ func (c *cache) Flush(ignoreErrors bool) error {
c.modeMtx.RLock()
defer c.modeMtx.RUnlock()
if !c.mode.ReadOnly() {
return errMustBeReadOnly
}
return c.flush(ignoreErrors)
}