mirror of
https://github.com/samba-team/samba.git
synced 2025-02-14 01:57:53 +03:00
r17279: conn->cnum is the tid we've given to the client. This has nothing to do with
our internal share number. Funny that it worked at all :-) Volker
This commit is contained in:
parent
42dec2192c
commit
afa6e90946
@ -792,7 +792,7 @@ static BOOL brl_unlock_windows(struct byte_range_lock *br_lck, const struct lock
|
|||||||
br_lck->modified = True;
|
br_lck->modified = True;
|
||||||
|
|
||||||
/* Unlock the underlying POSIX regions. */
|
/* Unlock the underlying POSIX regions. */
|
||||||
if(lp_posix_locking(br_lck->fsp->conn->cnum)) {
|
if(lp_posix_locking(SNUM(br_lck->fsp->conn))) {
|
||||||
release_posix_lock_windows_flavour(br_lck->fsp,
|
release_posix_lock_windows_flavour(br_lck->fsp,
|
||||||
plock->start,
|
plock->start,
|
||||||
plock->size,
|
plock->size,
|
||||||
@ -943,7 +943,7 @@ static BOOL brl_unlock_posix(struct byte_range_lock *br_lck, const struct lock_s
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Unlock any POSIX regions. */
|
/* Unlock any POSIX regions. */
|
||||||
if(lp_posix_locking(br_lck->fsp->conn->cnum)) {
|
if(lp_posix_locking(SNUM(br_lck->fsp->conn))) {
|
||||||
release_posix_lock_posix_flavour(br_lck->fsp,
|
release_posix_lock_posix_flavour(br_lck->fsp,
|
||||||
plock->start,
|
plock->start,
|
||||||
plock->size,
|
plock->size,
|
||||||
@ -1069,7 +1069,7 @@ BOOL brl_locktest(struct byte_range_lock *br_lck,
|
|||||||
* This only conflicts with Windows locks, not POSIX locks.
|
* This only conflicts with Windows locks, not POSIX locks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(lp_posix_locking(fsp->conn->cnum) && (lock_flav == WINDOWS_LOCK)) {
|
if(lp_posix_locking(SNUM(fsp->conn)) && (lock_flav == WINDOWS_LOCK)) {
|
||||||
ret = is_posix_locked(fsp, &start, &size, &lock_type, WINDOWS_LOCK);
|
ret = is_posix_locked(fsp, &start, &size, &lock_type, WINDOWS_LOCK);
|
||||||
|
|
||||||
DEBUG(10,("brl_locktest: posix start=%.0f len=%.0f %s for fnum %d file %s\n",
|
DEBUG(10,("brl_locktest: posix start=%.0f len=%.0f %s for fnum %d file %s\n",
|
||||||
@ -1135,7 +1135,7 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
|
|||||||
* see if there is a POSIX lock from a UNIX or NFS process.
|
* see if there is a POSIX lock from a UNIX or NFS process.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(lp_posix_locking(fsp->conn->cnum)) {
|
if(lp_posix_locking(SNUM(fsp->conn))) {
|
||||||
BOOL ret = is_posix_locked(fsp, pstart, psize, plock_type, POSIX_LOCK);
|
BOOL ret = is_posix_locked(fsp, pstart, psize, plock_type, POSIX_LOCK);
|
||||||
|
|
||||||
DEBUG(10,("brl_lockquery: posix start=%.0f len=%.0f %s for fnum %d file %s\n",
|
DEBUG(10,("brl_lockquery: posix start=%.0f len=%.0f %s for fnum %d file %s\n",
|
||||||
@ -1218,7 +1218,7 @@ void brl_close_fnum(struct byte_range_lock *br_lck)
|
|||||||
struct process_id pid = procid_self();
|
struct process_id pid = procid_self();
|
||||||
BOOL unlock_individually = False;
|
BOOL unlock_individually = False;
|
||||||
|
|
||||||
if(lp_posix_locking(fsp->conn->cnum)) {
|
if(lp_posix_locking(SNUM(fsp->conn))) {
|
||||||
|
|
||||||
/* Check if there are any Windows locks associated with this dev/ino
|
/* Check if there are any Windows locks associated with this dev/ino
|
||||||
pair that are not this fnum. If so we need to call unlock on each
|
pair that are not this fnum. If so we need to call unlock on each
|
||||||
@ -1326,7 +1326,7 @@ void brl_close_fnum(struct byte_range_lock *br_lck)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lp_posix_locking(fsp->conn->cnum) && num_deleted_windows_locks) {
|
if(lp_posix_locking(SNUM(fsp->conn)) && num_deleted_windows_locks) {
|
||||||
/* Reduce the Windows lock POSIX reference count on this dev/ino pair. */
|
/* Reduce the Windows lock POSIX reference count on this dev/ino pair. */
|
||||||
reduce_windows_lock_ref_count(fsp, num_deleted_windows_locks);
|
reduce_windows_lock_ref_count(fsp, num_deleted_windows_locks);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user