From de8abf0284d3589fc45ca15424091a7035f21c5d Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Fri, 11 Aug 2017 22:30:06 +0200 Subject: [PATCH] main: report is-detached only when bio is gone --- kernel/sy_old/mars_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index 18b8ed6f..57475a82 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -3991,7 +3991,11 @@ int make_bio(void *buf, struct mars_dent *dent) if (!rot) goto done; - is_attached = !!rot->trans_brick; + /* for detach, both the logger and the bio must be gone */ + if (rot->trans_brick) + is_attached = true; + else if (!rot->bio_brick) + is_attached = false; _show_actual(rot->parent_path, "is-attached", is_attached); rot->has_symlinks = true;