mem: fix --huge-unlink option
The final_va field is set during remap_segment() but this information is
not propagated to temporal copy of huge page memory configuration so the
unlink_hugepage_files() function wrongly assume that there is nothing to
unlink. Fix this issue by checking orig_va instead of final_va.
Fixes: 66cc45e293
("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
parent
66498f0ffe
commit
8e1fdcaa3d
@ -587,7 +587,7 @@ unlink_hugepage_files(struct hugepage_file *hugepg_tbl,
|
||||
for (page = 0; page < nrpages; page++) {
|
||||
struct hugepage_file *hp = &hugepg_tbl[page];
|
||||
|
||||
if (hp->final_va != NULL && unlink(hp->filepath)) {
|
||||
if (hp->orig_va != NULL && unlink(hp->filepath)) {
|
||||
RTE_LOG(WARNING, EAL, "%s(): Removing %s failed: %s\n",
|
||||
__func__, hp->filepath, strerror(errno));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user