From: Anatoly Burakov Date: Tue, 4 Sep 2018 15:15:42 +0000 (+0100) Subject: fbarray: fix detach in --no-shconf mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=310aa7c04143105200fd81ae3e5f680e22c9bb6a;p=dpdk.git fbarray: fix detach in --no-shconf mode In noshconf mode, no shared files are created, but we're still trying to unlink them, resulting in detach/destroy failure even though it should have succeeded. Fix it by exiting early in noshconf mode. Fixes: 3ee2cde248a7 ("fbarray: support --no-shconf mode") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c index 43caf3ced2..ba6c4ae394 100644 --- a/lib/librte_eal/common/eal_common_fbarray.c +++ b/lib/librte_eal/common/eal_common_fbarray.c @@ -878,6 +878,10 @@ rte_fbarray_destroy(struct rte_fbarray *arr) if (ret) return ret; + /* with no shconf, there were never any files to begin with */ + if (internal_config.no_shconf) + return 0; + /* try deleting the file */ eal_get_fbarray_path(path, sizeof(path), arr->name);