Commit 7173842a authored by Ramon Nou's avatar Ramon Nou
Browse files

Align flock syscall handling with libc

parent db8c1a4b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -655,8 +655,9 @@ hook_flock(unsigned long fd, int flags) {
        __func__, fd, flags);

    if(CTX->file_map()->exist(fd)) {
        errno = ENOTSUP;
        return -1;
        LOG(WARNING, "{}() flock on GekkoFS fd '{}' ignored; returning success",
            __func__, fd);
        return 0;
    }
    return syscall_no_intercept_wrapper(SYS_flock, fd, flags);
}