
On 09/06/2018 12:16 PM, Michal Privoznik wrote:
There is no need to check if @npaths is not zero. Let's qemuDomainNamespaceUnlinkPaths() handle that.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
At the cost of a possible unnecessary, but perhaps expensive call to qemuDomainGetPreservedMounts when npaths == 0? I think if you add a "filter" of npaths == 0, then return 0 in qemuDomainNamespaceUnlinkPaths, then that'd be a good thing... Reviewed-by: John Ferlan <jferlan@redhat.com> John I also wonder if the : if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT)) return 0; that's "duplicated" in qemuDomainNamespaceTeardownHostdev and qemuDomainNamespaceUnlinkPaths could be "reworked"...