diff --git a/src/add-ons/kernel/file_systems/nfs4/Inode.cpp b/src/add-ons/kernel/file_systems/nfs4/Inode.cpp index fe3d60d69c..abebe6f982 100644 --- a/src/add-ons/kernel/file_systems/nfs4/Inode.cpp +++ b/src/add-ons/kernel/file_systems/nfs4/Inode.cpp @@ -696,9 +696,13 @@ Inode::TestLock(OpenFileCookie* cookie, struct flock* lock) LockType ltype = sGetLockType(lock->l_type, false); uint64 position = lock->l_start; - uint64 length = lock->l_len; - bool conflict; + uint64 length; + if (lock->l_len + lock->l_start == OFF_MAX) + length = UINT64_MAX; + else + length = lock->l_len; + bool conflict; result = NFS4Inode::TestLock(cookie, <ype, &position, &length, conflict); if (result != B_OK) return result; diff --git a/src/add-ons/kernel/file_systems/nfs4/ReplyInterpreter.cpp b/src/add-ons/kernel/file_systems/nfs4/ReplyInterpreter.cpp index 271cabb490..1dbcd8d3dd 100644 --- a/src/add-ons/kernel/file_systems/nfs4/ReplyInterpreter.cpp +++ b/src/add-ons/kernel/file_systems/nfs4/ReplyInterpreter.cpp @@ -234,7 +234,7 @@ ReplyInterpreter::Lock(LockInfo* linfo) status_t ReplyInterpreter::LockT(uint64* pos, uint64* len, LockType* type) { - status_t res = _OperationError(OpLockU); + status_t res = _OperationError(OpLockT); if (res != B_WOULD_BLOCK || NFS4Error() != NFS4ERR_DENIED) return res;