OSDN Git Service

f2fs: fix a bug caused by NULL extent tree
authorYunlei He <heyunlei@huawei.com>
Fri, 19 May 2017 07:06:12 +0000 (15:06 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 13 Jul 2017 23:56:08 +0000 (16:56 -0700)
commite2b2bed0961e34d6fd1c293af66bd39b10a317f4
tree07df029191c777c883c27412a3cc8f876c00f8fc
parent842ce444fd86167f3e9dc858f22e4c90639764e0
f2fs: fix a bug caused by NULL extent tree

Thread A: Thread B:

-f2fs_remount
    -sbi->mount_opt.opt = 0;
<--- -f2fs_iget
         -do_read_inode
     -f2fs_init_extent_tree
         -F2FS_I(inode)->extent_tree is NULL
        -default_options && parse_options
    -remount return
<---  -f2fs_map_blocks
          -f2fs_lookup_extent_tree
                                                              -f2fs_bug_on(sbi, !et);

The same problem with f2fs_new_inode.

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/extent_cache.c