linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] Btrfs: fix possible memory leak in find_parent_nodes()
@ 2013-08-08  5:04 Wang Shilong
  2013-08-08  5:04 ` [PATCH 2/3] Btrfs: catch error return value from find_extent_in_eb() Wang Shilong
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Wang Shilong @ 2013-08-08  5:04 UTC (permalink / raw)
  To: linux-btrfs

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
---
 fs/btrfs/backref.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index cb73a12..54e7610 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -911,7 +911,6 @@ again:
 
 	while (!list_empty(&prefs)) {
 		ref = list_first_entry(&prefs, struct __prelim_ref, list);
-		list_del(&ref->list);
 		WARN_ON(ref->count < 0);
 		if (ref->count && ref->root_id && ref->parent == 0) {
 			/* no parent == root of tree */
@@ -954,6 +953,7 @@ again:
 				eie->next = ref->inode_list;
 			}
 		}
+		list_del(&ref->list);
 		kfree(ref);
 	}
 
-- 
1.8.0.1


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

end of thread, other threads:[~2013-08-08 14:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08  5:04 [PATCH 1/3] Btrfs: fix possible memory leak in find_parent_nodes() Wang Shilong
2013-08-08  5:04 ` [PATCH 2/3] Btrfs: catch error return value from find_extent_in_eb() Wang Shilong
2013-08-08 10:24   ` Filipe David Manana
2013-08-08 11:01     ` Wang Shilong
2013-08-08 11:06     ` Jan Schmidt
2013-08-08  5:04 ` [PATCH 3/3] Btrfs: allocate prelim_ref with a slab allocater Wang Shilong
2013-08-08 11:25   ` Jan Schmidt
2013-08-08 11:39     ` Wang Shilong
2013-08-08 14:19   ` David Sterba
2013-08-08  5:18 ` [PATCH 1/3] Btrfs: fix possible memory leak in find_parent_nodes() Liu Bo
2013-08-08  5:22 ` Liu Bo
2013-08-08  5:37   ` Miao Xie
2013-08-08 11:02 ` Jan Schmidt
2013-08-08 11:02   ` Wang Shilong

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).