From 4a16608150351561ee0686ba26c69adfb7963e96 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 7 Sep 2016 15:09:14 +0200 Subject: [PATCH] btrfs-progs: fi du: improved error handling in mark_inode_seen The callchain handles errors, don't crash on unexpected condition. Signed-off-by: David Sterba --- cmds-fi-du.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-fi-du.c b/cmds-fi-du.c index 47ceb969..a5b66e6f 100644 --- a/cmds-fi-du.c +++ b/cmds-fi-du.c @@ -228,7 +228,7 @@ static int mark_inode_seen(u64 ino, u64 subvol) else if (cmp > 0) p = &(*p)->rb_right; else - BUG(); + return -EEXIST; } si = calloc(1, sizeof(*si));