From d01899e15b95e8077a04138b02b5afe5bf1c4f49 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Thu, 1 Nov 2018 18:25:37 +0300 Subject: [PATCH] test/file_locks: use F_GETLK instead of F_GETLK64 F_GETLK64 has to be used with flock64 Reported-by: Mr Jenkins --- test/zdtm/static/file_locks00.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/zdtm/static/file_locks00.c b/test/zdtm/static/file_locks00.c index f751e377a..59e19cfe1 100644 --- a/test/zdtm/static/file_locks00.c +++ b/test/zdtm/static/file_locks00.c @@ -34,9 +34,9 @@ static int lock_reg(int fd, int cmd, int type, int whence, } #define set_read_lock(fd, whence, offset, len) \ - lock_reg(fd, F_SETLK64, F_RDLCK, whence, offset, len) + lock_reg(fd, F_SETLK, F_RDLCK, whence, offset, len) #define set_write_lock(fd, whence, offset, len) \ - lock_reg(fd, F_SETLK64, F_WRLCK, whence, offset, len) + lock_reg(fd, F_SETLK, F_WRLCK, whence, offset, len) static int check_read_lock(int fd, int whence, off_t offset, off_t len) { @@ -50,7 +50,7 @@ static int check_read_lock(int fd, int whence, off_t offset, off_t len) lock.l_pid = -1; errno = 0; - ret = fcntl(fd, F_GETLK64, &lock); + ret = fcntl(fd, F_GETLK, &lock); if (ret == -1) { pr_perror("F_GETLK failed."); return -1; @@ -79,7 +79,7 @@ static int check_write_lock(int fd, int whence, off_t offset, off_t len) lock.l_pid = -1; errno = 0; - ret = fcntl(fd, F_GETLK64, &lock); + ret = fcntl(fd, F_GETLK, &lock); if (ret == -1) { pr_perror("F_GETLK failed."); return -1;