• Jaegeuk Kim's avatar
    f2fs: fix iget/iput of dir during recovery · 5deb8267
    Jaegeuk Kim authored
    It is possible that iput is skipped after iget during the recovery.
    
    In recover_dentry(),
     dir = f2fs_iget();
     ...
     if (de && inode->i_ino == le32_to_cpu(de->ino))
    	goto out;
    
    In this case, this dir is not able to be added in dirty_dir_inode_list.
    The actual linking is done only when set_page_dirty() is called.
    
    So let's add this newly got inode into the list explicitly, and put it at the
    end of the recovery routine.
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
    5deb8267
recovery.c 10.8 KB