summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-04-04 20:38:12 +0000
committerJeremy Allison <jra@samba.org>2003-04-04 20:38:12 +0000
commit34226f1bd4d90ffe0f324277b11bbc4f2b575740 (patch)
treea44e535e8b42a27ce10ea0219198f65e6d77a9c2 /source3/smbd
parent4127c455c8fd446ab952de37fabbd7d8ef20847a (diff)
downloadsamba-34226f1bd4d90ffe0f324277b11bbc4f2b575740.tar.gz
samba-34226f1bd4d90ffe0f324277b11bbc4f2b575740.tar.bz2
samba-34226f1bd4d90ffe0f324277b11bbc4f2b575740.zip
Fix for very subtle POSIX lock interaction race condition found by
Herb. We need to unlock POSIX locks before notifying pending lock processes. Jeremy. (This used to be commit 6999eef51c3e597b3b2cd9cc26138acdfbb6a23a)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/blocking.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 581ce43f91..2802fbb151 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -523,7 +523,7 @@ file %s fnum = %d\n", blr->com_type, fsp->fsp_name, fsp->fnum ));
brl_unlock(blr->fsp->dev, blr->fsp->inode, blr->fsp->fnum,
blr->lock_pid, sys_getpid(), blr->fsp->conn->cnum,
- blr->offset, blr->count, True);
+ blr->offset, blr->count, True, NULL, NULL);
free_blocking_lock_record((blocking_lock_record *)ubi_slRemNext( &blocking_lock_queue, prev));
blr = (blocking_lock_record *)(prev ? ubi_slNext(prev) : ubi_slFirst(&blocking_lock_queue));
@@ -554,7 +554,7 @@ file %s fnum = %d\n", blr->com_type, fsp->fsp_name, fsp->fnum ));
blocking_lock_reply_error(blr,NT_STATUS_CANCELLED);
brl_unlock(blr->fsp->dev, blr->fsp->inode, blr->fsp->fnum,
blr->lock_pid, sys_getpid(), blr->fsp->conn->cnum,
- blr->offset, blr->count, True);
+ blr->offset, blr->count, True, NULL, NULL);
free_blocking_lock_record((blocking_lock_record *)ubi_slRemNext( &blocking_lock_queue, prev));
blr = (blocking_lock_record *)(prev ? ubi_slNext(prev) : ubi_slFirst(&blocking_lock_queue));
continue;
@@ -651,7 +651,7 @@ void process_blocking_lock_queue(time_t t)
brl_unlock(fsp->dev, fsp->inode, fsp->fnum,
blr->lock_pid, sys_getpid(), conn->cnum,
- blr->offset, blr->count, True);
+ blr->offset, blr->count, True, NULL, NULL);
blocking_lock_reply_error(blr,NT_STATUS_FILE_LOCK_CONFLICT);
free_blocking_lock_record((blocking_lock_record *)ubi_slRemNext( &blocking_lock_queue, prev));
@@ -669,7 +669,7 @@ void process_blocking_lock_queue(time_t t)
brl_unlock(fsp->dev, fsp->inode, fsp->fnum,
blr->lock_pid, sys_getpid(), conn->cnum,
- blr->offset, blr->count, True);
+ blr->offset, blr->count, True, NULL, NULL);
free_blocking_lock_record((blocking_lock_record *)ubi_slRemNext( &blocking_lock_queue, prev));
blr = (blocking_lock_record *)(prev ? ubi_slNext(prev) : ubi_slFirst(&blocking_lock_queue));
@@ -685,7 +685,7 @@ void process_blocking_lock_queue(time_t t)
brl_unlock(fsp->dev, fsp->inode, fsp->fnum,
blr->lock_pid, sys_getpid(), conn->cnum,
- blr->offset, blr->count, True);
+ blr->offset, blr->count, True, NULL, NULL);
free_blocking_lock_record((blocking_lock_record *)ubi_slRemNext( &blocking_lock_queue, prev));
blr = (blocking_lock_record *)(prev ? ubi_slNext(prev) : ubi_slFirst(&blocking_lock_queue));
@@ -703,7 +703,7 @@ void process_blocking_lock_queue(time_t t)
brl_unlock(fsp->dev, fsp->inode, fsp->fnum,
blr->lock_pid, sys_getpid(), conn->cnum,
- blr->offset, blr->count, True);
+ blr->offset, blr->count, True, NULL, NULL);
free_blocking_lock_record((blocking_lock_record *)ubi_slRemNext( &blocking_lock_queue, prev));
blr = (blocking_lock_record *)(prev ? ubi_slNext(prev) : ubi_slFirst(&blocking_lock_queue));