diff options
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5df336757d6c..710adc987937 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -247,6 +247,10 @@ go_write: | |||
247 | sync_nodes: | 247 | sync_nodes: |
248 | sync_node_pages(sbi, ino, &wbc); | 248 | sync_node_pages(sbi, ino, &wbc); |
249 | 249 | ||
250 | /* if cp_error was enabled, we should avoid infinite loop */ | ||
251 | if (unlikely(f2fs_cp_error(sbi))) | ||
252 | goto out; | ||
253 | |||
250 | if (need_inode_block_update(sbi, ino)) { | 254 | if (need_inode_block_update(sbi, ino)) { |
251 | mark_inode_dirty_sync(inode); | 255 | mark_inode_dirty_sync(inode); |
252 | f2fs_write_inode(inode, NULL); | 256 | f2fs_write_inode(inode, NULL); |