mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxl: avoid infinite loop in libxl__remove_directory()
Infinitely retrying the rmdir() invocation makes little sense. While the original observation was the log filling the disk (due to repeated "Directory not empty" errors, in turn occurring for unclear reasons), the loop wants breaking even if there was no error message being logged (much like is done in the similar loops in libxl__remove_file() and libxl__remove_file_or_directory()). Fixes:c4dcbee67e("libxl: provide libxl__remove_file et al") Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Juergen Gross <jgross@suse.com> Acked-by: Anthony PERARD <anthony.perard@vates.tech> master commit:68baeb5c48master date: 2025-03-13 10:23:10 +0100
This commit is contained in:
1 parent
80cbb29612
commit
b29984df38
1 file changed
+1
@@ -577,6 +577,7 @@ int libxl__remove_directory(libxl__gc *gc, const char *dirpath)
|
||||
if (errno == EINTR) continue;
|
||||
LOGE(ERROR, "failed to remove emptied directory %s", dirpath);
|
||||
rc = ERROR_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||