f2fs: avoid infinite loop at cp_error
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 17 Oct 2014 21:14:16 +0000 (14:14 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Nov 2014 00:07:31 +0000 (16:07 -0800)
This patch avoids an infinite loop in sync_dirty_inode_page when -EIO was
detected.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c

index dd10a031c0523700cadee8346d254685f45fe9db..ca514d599b79a66b4fdf3aa3dda855d214a2f261 100644 (file)
@@ -731,6 +731,9 @@ void sync_dirty_dir_inodes(struct f2fs_sb_info *sbi)
        struct dir_inode_entry *entry;
        struct inode *inode;
 retry:
+       if (unlikely(f2fs_cp_error(sbi)))
+               return;
+
        spin_lock(&sbi->dir_inode_lock);
 
        head = &sbi->dir_inode_list;