[fix: ae75f0ca76 f2fs: introduce free nid bitmap]
Signed-off-by: Hou Pengyang <houpengy...@huawei.com>
---
 fs/f2fs/node.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 6d43095..353c01d 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2650,8 +2650,11 @@ int init_free_nid_cache(struct f2fs_sb_info *sbi)
 
        nm_i->nat_block_bitmap = f2fs_kvzalloc(nm_i->nat_blocks / 8,
                                                                GFP_KERNEL);
-       if (!nm_i->nat_block_bitmap)
+       if (!nm_i->nat_block_bitmap) {
+               kvfree(nm_i->free_nid_bitmap);
                return -ENOMEM;
+       }
+
        return 0;
 }
 
-- 
2.10.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to