diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-05-15 10:45:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:06:59 -0500 |
commit | 8dbffb37d53f1ef4f8b160c8452c13ac6a471e4d (patch) | |
tree | 232cdf59d686cbad0da739738607401be1f69546 | |
parent | 5415e9d94f51f83bc0beba69888c70c8525812d4 (diff) | |
download | samba-8dbffb37d53f1ef4f8b160c8452c13ac6a471e4d.tar.gz samba-8dbffb37d53f1ef4f8b160c8452c13ac6a471e4d.tar.xz samba-8dbffb37d53f1ef4f8b160c8452c13ac6a471e4d.zip |
r15612: look at the lock_type and not at the notify_ptr being NULL or not
metze
(This used to be commit 7fa6d736913af2d1d2215ca1a04ed8763ccb3d45)
-rw-r--r-- | source4/ntvfs/common/brlock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c index bc9d8b1288..80c4350eac 100644 --- a/source4/ntvfs/common/brlock.c +++ b/source4/ntvfs/common/brlock.c @@ -411,7 +411,7 @@ NTSTATUS brl_unlock(struct brl_context *brl, lock->fnum == fnum && lock->start == start && lock->size == size && - lock->notify_ptr == NULL) { + lock->lock_type < PENDING_READ_LOCK) { /* found it - delete it */ if (count == 1) { if (tdb_delete(brl->w->tdb, kbuf) != 0) { @@ -487,7 +487,8 @@ NTSTATUS brl_remove_pending(struct brl_context *brl, for (i=0; i<count; i++) { struct lock_struct *lock = &locks[i]; - if (lock->notify_ptr == notify_ptr && + if (lock->lock_type >= PENDING_READ_LOCK && + lock->notify_ptr == notify_ptr && lock->context.server == brl->server) { /* found it - delete it */ if (count == 1) { |