f2fs: remove unneeded disable_nat_bits()
authorChao Yu <yuchao0@huawei.com>
Thu, 4 Oct 2018 03:15:20 +0000 (11:15 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 26 Oct 2018 18:26:42 +0000 (11:26 -0700)
Commit 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()")
added disable_nat_bits() in error path of __get_nat_bitmaps(), but it's
unneeded, beause we will fail mount, we won't have chance to change nid
usage status w/o nat full/empty bitmaps.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c

index fb8683c9f947752823855ea8416c9b7a3efb3685..bea66bd7fdcb10b9fd59af7332d07d25caf3f198 100644 (file)
@@ -2879,10 +2879,8 @@ static int __get_nat_bitmaps(struct f2fs_sb_info *sbi)
                struct page *page;
 
                page = f2fs_get_meta_page(sbi, nat_bits_addr++);
-               if (IS_ERR(page)) {
-                       disable_nat_bits(sbi, true);
+               if (IS_ERR(page))
                        return PTR_ERR(page);
-               }
 
                memcpy(nm_i->nat_bits + (i << F2FS_BLKSIZE_BITS),
                                        page_address(page), F2FS_BLKSIZE);