todo: should delay parent unmount() by returning res prom?
11732
function removeChild(parEl, el) {
	var node = el._node;

	// already marked for removal
	if (node._dead) { return; }

	var res = deepNotifyRemove(node);

	if (res != null && isProm(res)) {
		node._dead = true;
		res.then(curry(_removeChild, [parEl, el, true]));
	}
	else
		{ _removeChild(parEl, el); }
}
901441
def unmount(self):
        """"""

        self.unmount_bindmounts()
        self.unmount_mounts()
        self.unmount_volume_groups()
        self.unmount_loopbacks()
        self.unmount_base_images()
        self.clean_dirs()
227338
function (i, res, files, cb) {
        if (!files.length || files.length == 0) {
            cb(false)
        } else {
            if ( fs.existsSync(files[i].target) ) new _(files[i].target).rmSync();

            var sourceStream = fs.createReadStream(files[i].source);
            var destinationStream = fs.createWriteStream(files[i].target);

            sourceStream
                .pipe(destinationStream)
                .on('error', function () {
                    var err = 'Error on SuperController::copyFile(...): Not found ' + files[i].source + ' or ' + files[i].target;
                    cb(err)
                })
                .on('close', function () {

                    try {
                        fs.unlinkSync(files[i].source);
                        files.splice(i, 1);
                    } catch (err) {
                        cb(err)
                    }

                    movefiles(i, res, files, cb)
                })
        }
    }
466700
function (src, destId, next, parent) {
            var oldId = src.id;
            src.parent = destId;

            async.waterfall([
                async.apply(_getAncestorsFromImmediateParent, destId, parent),
                function saveNodesAncestors(newAncestors, next) {
                    src.ancestors = newAncestors;
                    src._id = new ObjectId();
                    pendingInsertNodes.push(src);
                    async.parallel([
                            function findContentEntries(next) {
                                contentModel.find({"meta.node": oldId}).exec(function (err, data) {
                                    if (err) {
                                        next(err);
                                    }
                                    else {
                                        next(null, data);
                                    }
                                });
                            },
                            function findNodeEntries(next) {
                                nodeModel.find({parent: oldId}).exec(function (err, data) {
                                    if (err) {
                                        next(err);
                                    }
                                    else {
                                        next(null, data);
                                    }
                                });
                            }
                        ],
                        function handleFoundContentAndNodes(err, data) {
                            var contentEntries = data[0], nodeEntries = data[1];
                            _.each(contentEntries, function (item) {
                                item.meta.node = src._id;
                                item._id = new ObjectId();
                                pendingInsertContent.push(item);
                            });
                            if (!nodeEntries.length) {
                                next();
                            }
                            else {
                                async.each(nodeEntries, function (item, next) {
                                    _recursiveCopyNodes(item, src._id, next, src);
                                }, function (err) {
                                    next(err);
                                });
                            }
                        });

                }
            ], function (err) {
                next(err);
            });
        }
98873
function _callRemovalHooks(position) {
  var _arr = removalHooks[position];

  for (var _i = 0; _i < _arr.length; _i++) {
    var fn = _arr[_i];
    if (fn(this, this.parentPath)) return true;
  }
}
1047245
def umount(mountpoint, persist=False):
    """"""
    cmd_args = ['umount', mountpoint]
    try:
        subprocess.check_output(cmd_args)
    except subprocess.CalledProcessError as e:
        log('Error unmounting {}\n{}'.format(mountpoint, e.output))
        return False

    if persist:
        return fstab_remove(mountpoint)
    return True
656923
function safelyCallComponentWillUnmount(current, instance) {
    {
      invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);
      if (hasCaughtError$1()) {
        var unmountError = clearCaughtError$1();
        captureError(current, unmountError);
      }
    }
  }
591866
def unlink(self, req, parent, name):
        
        self.reply_err(req, errno.EROFS)
434582
function LocalFilesystemHandler(req, res, next, local = false) {
            if (!self.settings.localFilesystem) {
                return next();
            }
            return FilesystemHandler(req, res, next, self.localFilesystemUrl, undefined, local);
        }
127955
function willUnmount(vm) {
	unsetReaction(vm);

	var _willUnmount = vm._mobxObserver.willUnmount;
	if (_willUnmount)
		_willUnmount.apply(this, arguments);
}
261617
function _mountChild (parent, child) {
  if (parent.isMounted()) {
    child.triggerDidMount()
  }
  if (child._owner && child._ref) {
    child._owner.refs[child._ref] = child
  }
}
27575
function (child, node) {
	      var update = this.removeChild(child, node);
	      child._mountIndex = null;
	      return update;
	    }
492358
function _onChildNodeRemoved(event, res) {
        // res = {parentNodeId, nodeId}
        if (res.nodeId > 0) {
            var node = nodeWithId(res.nodeId);
            node.remove();
        }
    }
1354625
def unmount_path(path, force=False):
        
        r = util.subp(['umount', path])
        if not force:
            if r.return_code != 0:
                raise ValueError(r.stderr)
248092
def umount(self, forced=True):
        
        if self.is_mounted():
            if is_osx():
                cmd = ["/usr/sbin/diskutil", "unmount",
                       self.connection["mount_point"]]
                if forced:
                    cmd.insert(2, "force")
                subprocess.check_call(cmd)
            else:
                cmd = ["umount", self.connection["mount_point"]]
                if forced:
                    cmd.insert(1, "-f")
                subprocess.check_call(cmd)
1286294
@Override
    public void purgeDeviceObject(Long threadId, Integer deviceId, Long objectId, AllocationPoint point,
                    boolean copyback) {
        if (point.getAllocationStatus() != AllocationStatus.DEVICE)
            return;

        flowController.waitTillReleased(point);

        free(point, AllocationStatus.DEVICE);

        if (!deviceAllocations.get(deviceId).containsKey(objectId))
            throw new IllegalStateException("Can't happen ever");

        forget(point, AllocationStatus.DEVICE);

        if (deviceAllocations.get(deviceId).containsKey(objectId))
            throw new IllegalStateException("Can't happen ever");

        deviceMemoryTracker.subFromAllocation(threadId, deviceId, AllocationUtils.getRequiredMemory(point.getShape()));

        point.setAllocationStatus(AllocationStatus.HOST);

        //environment.trackAllocatedMemory(deviceId, AllocationUtils.getRequiredMemory(point.getShape()));
    }
825309
function unmountRedundant(items, tags) {

  var i = tags.length,
    j = items.length,
    t

  while (i > j) {
    t = tags[--i]
    tags.splice(i, 1)
    t.unmount()
  }
}