linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: check: release path after usage
@ 2016-10-24 15:18 Goldwyn Rodrigues
  2016-10-24 17:27 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Goldwyn Rodrigues @ 2016-10-24 15:18 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goldwyn Rodrigues

From: Goldwyn Rodrigues <rgoldwyn@suse.com>

While performing an fsck, an assertion failure occurs because of reusing path in a loop.
ctree.c:1112: btrfs_search_slot: Warning: assertion `p->nodes[0] != NULL` failed, value 0

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>

---

diff --git a/cmds-check.c b/cmds-check.c
index 670ccd1..5d9c724 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -7543,6 +7543,7 @@ static int record_orphan_data_extents(struct btrfs_fs_info *fs_info,
 		key.offset = dback->offset;
 
 		ret = btrfs_search_slot(NULL, dest_root, &key, path, 0, 0);
+		btrfs_release_path(path);
 		/*
 		 * For ret < 0, it's OK since the fs-tree may be corrupted,
 		 * we need to record it for inode/file extent rebuild.

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

* Re: [PATCH] btrfs-progs: check: release path after usage
  2016-10-24 15:18 [PATCH] btrfs-progs: check: release path after usage Goldwyn Rodrigues
@ 2016-10-24 17:27 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2016-10-24 17:27 UTC (permalink / raw)
  To: Goldwyn Rodrigues; +Cc: linux-btrfs, Goldwyn Rodrigues

On Mon, Oct 24, 2016 at 10:18:14AM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgoldwyn@suse.com>
> 
> While performing an fsck, an assertion failure occurs because of reusing path in a loop.
> ctree.c:1112: btrfs_search_slot: Warning: assertion `p->nodes[0] != NULL` failed, value 0
> 
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>

Applied, thanks.

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

end of thread, other threads:[~2016-10-24 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 15:18 [PATCH] btrfs-progs: check: release path after usage Goldwyn Rodrigues
2016-10-24 17:27 ` David Sterba

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