aboutsummaryrefslogtreecommitdiff
path: root/util/osdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/osdep.c')
-rw-r--r--util/osdep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/util/osdep.c b/util/osdep.c
index 77c1a6c562..e996c4744a 100644
--- a/util/osdep.c
+++ b/util/osdep.c
@@ -244,9 +244,7 @@ static int qemu_lock_fcntl(int fd, int64_t start, int64_t len, int fl_type)
.l_type = fl_type,
};
qemu_probe_lock_ops();
- do {
- ret = fcntl(fd, fcntl_op_setlk, &fl);
- } while (ret == -1 && errno == EINTR);
+ ret = RETRY_ON_EINTR(fcntl(fd, fcntl_op_setlk, &fl));
return ret == -1 ? -errno : 0;
}