nfs4: VFS uses signed offsets while NFS4 expects unsigned
This commit is contained in:
parent
1a0386d743
commit
c5a88cf7e6
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user