diff options
author | drh <drh@noemail.net> | 2015-12-02 01:04:33 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-12-02 01:04:33 +0000 |
commit | 50358adfaaef3ab020bbf0d51560141d9a6713db (patch) | |
tree | 011d387f850f092b8bf33bd845cf317215e97942 /src/os_unix.c | |
parent | dcfb9652fda0becc56e4a2f507155e5352c785ab (diff) | |
download | sqlite-50358adfaaef3ab020bbf0d51560141d9a6713db.tar.gz sqlite-50358adfaaef3ab020bbf0d51560141d9a6713db.zip |
Simplification of the logic used to take the process-wide lock in the
unix-excl VFS.
FossilOrigin-Name: 73defd52bb0e3e5db763d3bfbeebc972b645867e
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 35f401e74..38c8d7b61 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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 ); |