diff options
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/brlock.c | 30 | ||||
-rw-r--r-- | source3/locking/posix.c | 16 |
2 files changed, 46 insertions, 0 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index e238ec959b..05d6c7f95d 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -774,6 +774,17 @@ static NTSTATUS brl_lock_posix(struct messaging_context *msg_ctx, return status; } +NTSTATUS smb_vfs_call_brl_lock_windows(struct vfs_handle_struct *handle, + struct byte_range_lock *br_lck, + struct lock_struct *plock, + bool blocking_lock, + struct blocking_lock_record *blr) +{ + VFS_FIND(brl_lock_windows); + return handle->fns->brl_lock_windows(handle, br_lck, plock, + blocking_lock, blr); +} + /**************************************************************************** Lock a range of bytes. ****************************************************************************/ @@ -1116,6 +1127,15 @@ static bool brl_unlock_posix(struct messaging_context *msg_ctx, return True; } +bool smb_vfs_call_brl_unlock_windows(struct vfs_handle_struct *handle, + struct messaging_context *msg_ctx, + struct byte_range_lock *br_lck, + const struct lock_struct *plock) +{ + VFS_FIND(brl_unlock_windows); + return handle->fns->brl_unlock_windows(handle, msg_ctx, br_lck, plock); +} + /**************************************************************************** Unlock a range of bytes. ****************************************************************************/ @@ -1274,6 +1294,16 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck, return NT_STATUS_OK; } + +bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle, + struct byte_range_lock *br_lck, + struct lock_struct *plock, + struct blocking_lock_record *blr) +{ + VFS_FIND(brl_cancel_windows); + return handle->fns->brl_cancel_windows(handle, br_lck, plock, blr); +} + /**************************************************************************** Remove a particular pending lock. ****************************************************************************/ diff --git a/source3/locking/posix.c b/source3/locking/posix.c index 33ffaf95ca..17945399c5 100644 --- a/source3/locking/posix.c +++ b/source3/locking/posix.c @@ -177,6 +177,14 @@ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out, return True; } +bool smb_vfs_call_lock(struct vfs_handle_struct *handle, + struct files_struct *fsp, int op, SMB_OFF_T offset, + SMB_OFF_T count, int type) +{ + VFS_FIND(lock); + return handle->fns->lock(handle, fsp, op, offset, count, type); +} + /**************************************************************************** Actual function that does POSIX locks. Copes with 64 -> 32 bit cruft and broken NFS implementations. @@ -220,6 +228,14 @@ static bool posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF return ret; } +bool smb_vfs_call_getlock(struct vfs_handle_struct *handle, + struct files_struct *fsp, SMB_OFF_T *poffset, + SMB_OFF_T *pcount, int *ptype, pid_t *ppid) +{ + VFS_FIND(getlock); + return handle->fns->getlock(handle, fsp, poffset, pcount, ptype, ppid); +} + /**************************************************************************** Actual function that gets POSIX locks. Copes with 64 -> 32 bit cruft and broken NFS implementations. |