From 4bda889d737ee2b1fb2381e658bcf4f2a7ca21c8 Mon Sep 17 00:00:00 2001 From: HuangLiming Date: Tue, 18 Aug 2020 04:58:53 -0400 Subject: [PATCH] fix error in clearing secondary process memseg lists Signed-off-by: HuangLiming --- lib/librte_eal/common/eal_common_fbarray.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c index b611ffa..116c695 100644 --- a/lib/librte_eal/common/eal_common_fbarray.c +++ b/lib/librte_eal/common/eal_common_fbarray.c @@ -1105,7 +1105,7 @@ int rte_sec_fbarray_destroy(struct rte_fbarray *arr, const int sec_idx) { - int fd, ret; + int fd; size_t mmap_len; char path[PATH_MAX]; @@ -1134,15 +1134,13 @@ rte_sec_fbarray_destroy(struct rte_fbarray *arr, if (flock(fd, LOCK_EX | LOCK_NB)) { RTE_LOG(DEBUG, EAL, "Cannot destroy fbarray - another process is using it\n"); rte_errno = EBUSY; - ret = -1; } else { - ret = 0; unlink(path); memset(arr, 0, sizeof(*arr)); } close(fd); - return ret; + return 0; } void * -- 2.21.0