1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Simplification of the logic used to take the process-wide lock in the

unix-excl VFS.

FossilOrigin-Name: 73defd52bb0e3e5db763d3bfbeebc972b645867e
This commit is contained in:
drh
2015-12-02 01:04:33 +00:00
parent dcfb9652fd
commit 50358adfaa
3 changed files with 8 additions and 10 deletions

View File

@@ -1406,9 +1406,7 @@ static int unixFileLock(unixFile *pFile, struct flock *pLock){
unixInodeInfo *pInode = pFile->pInode;
assert( unixMutexHeld() );
assert( pInode!=0 );
if( ((pFile->ctrlFlags & UNIXFILE_EXCL)!=0 || pInode->bProcessLock)
&& ((pFile->ctrlFlags & UNIXFILE_RDONLY)==0)
){
if( (pFile->ctrlFlags & (UNIXFILE_EXCL|UNIXFILE_RDONLY))==UNIXFILE_EXCL ){
if( pInode->bProcessLock==0 ){
struct flock lock;
assert( pInode->nLock==0 );