diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-04-11 05:49:35 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-05-06 21:21:53 -0400 |
commit | a4ed23f2f1a875f4b50d5f7e3dd5b0abbedda1ff (patch) | |
tree | 968baf8d4d277cdca924268097823d9058f14774 | |
parent | 38583f095c5a8138ae2a1c9173d0fd8a9f10e8aa (diff) |
f2fs: put the bio when issue_flush completed
Put the bio when the flush cmd issued, it also can fix the following
kmemleak:
unreferenced object 0xffff8800270c73c0 (size 200):
comm "f2fs_flush-7:0", pid 27161, jiffies 4312127988 (age 988.503s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 40 07 81 19 01 88 ff ff ........@.......
01 00 00 00 00 00 00 f0 11 14 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81559866>] kmemleak_alloc+0x72/0x96
[<ffffffff81156f7e>] slab_post_alloc_hook+0x28/0x2a
[<ffffffff811595b1>] kmem_cache_alloc+0xec/0x157
[<ffffffff8111924d>] mempool_alloc_slab+0x15/0x17
[<ffffffff81119513>] mempool_alloc+0x71/0x138
[<ffffffff81193548>] bio_alloc_bioset+0x93/0x18c
[<ffffffffa040f857>] issue_flush_thread+0x8d/0x145 [f2fs]
[<ffffffff8107ac16>] kthread+0xba/0xc2
[<ffffffff81571b2c>] ret_from_fork+0x7c/0xb0
[<ffffffffffffffff>] 0xffffffffffffffff
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
-rw-r--r-- | fs/f2fs/segment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 085f548be7a3..524b7ed36e0a 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c | |||
@@ -226,6 +226,7 @@ repeat: | |||
226 | next = cmd->next; | 226 | next = cmd->next; |
227 | complete(&cmd->wait); | 227 | complete(&cmd->wait); |
228 | } | 228 | } |
229 | bio_put(bio); | ||
229 | sm_i->dispatch_list = NULL; | 230 | sm_i->dispatch_list = NULL; |
230 | } | 231 | } |
231 | 232 | ||