diff options
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/journal.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index f669ae1ff7a2..d00193077bce 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -925,8 +925,14 @@ int jbd2_fc_wait_bufs(journal_t *journal, int num_blks) wait_on_buffer(bh); put_bh(bh); journal->j_fc_wbuf[i] = NULL; - if (unlikely(!buffer_uptodate(bh))) + /* + * Update j_fc_off so jbd2_fc_release_bufs can release remain + * buffer head. + */ + if (unlikely(!buffer_uptodate(bh))) { + journal->j_fc_off = i; return -EIO; + } } return 0; |