[LTP] [PATCH v2 4/4] fsx-linux: Use SAFE_MSYNC()

Petr Vorel pvorel@suse.cz
Thu Dec 7 22:27:39 CET 2023


Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/fs/fsx-linux/fsx-linux.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/testcases/kernel/fs/fsx-linux/fsx-linux.c b/testcases/kernel/fs/fsx-linux/fsx-linux.c
index 5b099c8a0..fed79f956 100644
--- a/testcases/kernel/fs/fsx-linux/fsx-linux.c
+++ b/testcases/kernel/fs/fsx-linux/fsx-linux.c
@@ -266,10 +266,8 @@ static int op_map_write(void)
 		(off_t)pos.offset);
 
 	memcpy(addr, file_buff + pos.offset, pos.size);
-	msync(addr, pos.size, MS_SYNC);
-
+	SAFE_MSYNC(addr, pos.size, MS_SYNC);
 	SAFE_MUNMAP(addr, pos.size);
-
 	update_file_size(&pos);
 
 	return 1;
-- 
2.43.0



More information about the ltp mailing list