f2fs: fix a mount fail for wrong next_scan_nid
authorYunlei He <heyunlei@huawei.com>
Wed, 26 Apr 2017 07:56:52 +0000 (15:56 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 4 May 2017 02:00:30 +0000 (19:00 -0700)
commite9cdd307704b5a8f685fa3fff4403691fbf64f97
tree8dc251a86f1a2c61a529542807a3dd1fdc024a3e
parentbaaabbb72b0960d6d5220b77f206116aa54771de
f2fs: fix a mount fail for wrong next_scan_nid

-write_checkpoint
   -do_checkpoint
      -next_free_nid    <--- something wrong with next free nid

-f2fs_fill_super
   -build_node_manager
      -build_free_nids
          -get_current_nat_page
             -__get_meta_page   <--- attempt to access beyond end of device

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