18035
|
1 |
diff --git a/gio/fen/fen-node.c b/gio/fen/fen-node.c
|
|
2 |
index 7238e36..a57e196 100644
|
|
3 |
--- a/gio/fen/fen-node.c
|
|
4 |
+++ b/gio/fen/fen-node.c
|
|
5 |
@@ -417,9 +417,24 @@ node_adjust_deleted(node_t* f)
|
|
6 |
|
|
7 |
FN_W ("%s %s\n", __func__, NODE_NAME(f));
|
|
8 |
|
|
9 |
- for (ancestor = node_find_accessible_ancestor(f);
|
|
10 |
- !NODE_HAS_STATE(ancestor, NODE_STATE_ASSOCIATED) && port_add(ancestor) != 0;
|
|
11 |
- ancestor = node_find_accessible_ancestor(ancestor)) { /* Empty */ }
|
|
12 |
+ for (ancestor = NODE_PARENT(f);
|
|
13 |
+ ancestor != NULL;
|
|
14 |
+ ancestor = NODE_PARENT(ancestor)) {
|
|
15 |
+ /* Stop if we find a node which been already associated or is existed
|
|
16 |
+ * and can be associated.
|
|
17 |
+ */
|
|
18 |
+ if (NODE_HAS_STATE(ancestor, NODE_STATE_ASSOCIATED) ||
|
|
19 |
+ (node_lstat(ancestor) == 0 && port_add(ancestor) == 0)) {
|
|
20 |
+ break;
|
|
21 |
+ }
|
|
22 |
+ }
|
|
23 |
+
|
|
24 |
+ /* We assume we shouldn't reach here, because Root is always existed and
|
|
25 |
+ * associated. But given bugster#6955199, if PORT FS has problems on root,
|
|
26 |
+ * we may reach here. So just return ROOT and the whole GIO fen backend will
|
|
27 |
+ * fail.
|
|
28 |
+ */
|
|
29 |
+ /* g_assert(ancestor != NULL); */
|
|
30 |
}
|
|
31 |
|
|
32 |
|