Skip to content

Commit

Permalink
hugemmap21: Use SAFE_MSYNC()
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Nov 15, 2023
1 parent 433e37d commit 5221f31
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions testcases/kernel/mem/hugetlb/hugemmap/hugemmap21.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ static void do_work(int thread, size_t size, int fd)
for (i = 0; i < size; i++)
memcpy((char *)addr+i, &pattern, 1);

if (msync(addr, size, MS_SYNC))
tst_brk(TBROK | TERRNO, "Thread %d (pid %d): msync() failed",
thread, getpid());
SAFE_MSYNC(addr, size, MS_SYNC);

for (i = 0; i < size; i++) {
if (addr[i] != pattern) {
Expand Down

0 comments on commit 5221f31

Please sign in to comment.