summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/locking/brlock.c3
-rw-r--r--source3/locking/locking.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9487f4254c..146775bd2a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -823,7 +823,7 @@ BOOL brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
BOOL brl_unlock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
uint16 smbpid, pid_t pid, uint16 tid,
br_off start, br_off size);
-BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino,
+BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
uint16 smbpid, pid_t pid, uint16 tid,
br_off start, br_off size,
enum brl_type lock_type);
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 51f3175dbf..78a9174141 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -300,7 +300,7 @@ smbpid = %u, pid = %u, tid = %u\n",
Test if we could add a lock if we wanted to.
****************************************************************************/
-BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino,
+BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
uint16 smbpid, pid_t pid, uint16 tid,
br_off start, br_off size,
enum brl_type lock_type)
@@ -325,6 +325,7 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino,
lock.context.tid = tid;
lock.start = start;
lock.size = size;
+ lock.fnum = fnum;
lock.lock_type = lock_type;
if (dbuf.dptr) {
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 47ae917f9a..07411e8919 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -68,7 +68,7 @@ BOOL is_locked(files_struct *fsp,connection_struct *conn,
if (!lp_locking(snum) || !lp_strict_locking(snum))
return(False);
- ret = !brl_locktest(fsp->dev, fsp->inode,
+ ret = !brl_locktest(fsp->dev, fsp->inode, fsp->fnum,
global_smbpid, sys_getpid(), conn->cnum,
offset, count, lock_type);