Merge "Keep track of remaining fd when devices are removed"