diff options
-rw-r--r-- | drivers/md/bcache/journal.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index a1b08e1c3ef1..d98f5915fcef 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -210,8 +210,13 @@ redo_peek: } if (ret == -EINTR) goto redo_peek; - if (ret) - BUG(); + if (ret) { + /* -EROFS or perhaps -ENOSPC - bail out: */ + + bch_btree_iter_unlock(&iter); + closure_sync(&cl); + return; + } } bch_btree_iter_unlock(&iter); |