]> Git Repo - linux.git/blobdiff - fs/f2fs/recovery.c
Merge branch 'akpm' (patches from Andrew)
[linux.git] / fs / f2fs / recovery.c
index d025aa83fb5bb344fcb5799f080d033895e584aa..907d6b7dde6a7f636ea7027d461cfd029b8b1ae5 100644 (file)
@@ -198,7 +198,8 @@ static void recover_inode(struct inode *inode, struct page *page)
                        ino_of_node(page), name);
 }
 
-static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
+static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head,
+                               bool check_only)
 {
        struct curseg_info *curseg;
        struct page *page = NULL;
@@ -225,7 +226,8 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
 
                entry = get_fsync_inode(head, ino_of_node(page));
                if (!entry) {
-                       if (IS_INODE(page) && is_dent_dnode(page)) {
+                       if (!check_only &&
+                                       IS_INODE(page) && is_dent_dnode(page)) {
                                err = recover_inode_page(sbi, page);
                                if (err)
                                        break;
@@ -569,7 +571,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
        mutex_lock(&sbi->cp_mutex);
 
        /* step #1: find fsynced inode numbers */
-       err = find_fsync_dnodes(sbi, &inode_list);
+       err = find_fsync_dnodes(sbi, &inode_list, check_only);
        if (err || list_empty(&inode_list))
                goto out;
 
This page took 0.02605 seconds and 4 git commands to generate.