linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] f2fs: fix a memleak issue
@ 2017-02-27 13:02 Hou Pengyang
  2017-02-27 13:02 ` [PATCH 2/3] f2fs: add f2fs_drop_inode tracepoint Hou Pengyang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Hou Pengyang @ 2017-02-27 13:02 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: linux-f2fs-devel

[fix: ae75f0ca76 f2fs: introduce free nid bitmap]
Signed-off-by: Hou Pengyang <houpengyang@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-28  2:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-27 13:02 [PATCH 1/3] f2fs: fix a memleak issue Hou Pengyang
2017-02-27 13:02 ` [PATCH 2/3] f2fs: add f2fs_drop_inode tracepoint Hou Pengyang
2017-02-27 13:02 ` [PATCH 3/3] f2fs: fix a plint compile warning Hou Pengyang
2017-02-27 13:52 ` [PATCH 1/3] f2fs: fix a memleak issue Kinglong Mee
2017-02-28  2:06   ` Hou Pengyang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).