aboutsummaryrefslogtreecommitdiff
path: root/hugeadm.c
diff options
context:
space:
mode:
authorEric B Munson <ebmunson@us.ibm.com>2009-05-29 09:55:35 +0100
committerEric B Munson <ebmunson@us.ibm.com>2009-05-29 09:55:35 +0100
commit717c2fea9306343e6ede283202057d7c64207fd0 (patch)
tree8239537b75cdb78ec79f652a27e8ee40da2e5f04 /hugeadm.c
parentc98b9fd5fea496cb8ed1fe2b467c6ca480a52590 (diff)
downloadlibhugetlbfs-717c2fea9306343e6ede283202057d7c64207fd0.tar.gz
Make file name in rem_temp_swap match the one in add2.4
Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'hugeadm.c')
-rw-r--r--hugeadm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hugeadm.c b/hugeadm.c
index 403193f..80bbc09 100644
--- a/hugeadm.c
+++ b/hugeadm.c
@@ -658,8 +658,10 @@ void add_temp_swap()
void rem_temp_swap() {
char file[PATH_MAX];
+ long pid;
- snprintf(file, PATH_MAX, "%s/swap/temp/swapfile", MOUNT_DIR);
+ pid = getpid();
+ snprintf(file, PATH_MAX, "%s/swap/temp/swapfile-%ld", MOUNT_DIR, pid);
if (swapoff(file))
WARNING("swapoff on %s failed: %s\n", file, strerror(errno));
remove(file);