static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock)
+ struct lock_struct *plock)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock)
+ struct lock_struct *plock)
{
- return SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle,
- br_lck, plock, blocking_lock);
+ return SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock);
}
static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
/* Version 41 - add st_ex_itime to struct stat_ex */
/* Version 41 - add st_ex_file_id to struct stat_ex */
/* Version 41 - add SMB_VFS_FS_FILE_ID */
+/* Version 41 - Remove "blocking_lock" parameter from
+ SMB_VFS_BRL_LOCK_WINDOWS */
#define SMB_VFS_INTERFACE_VERSION 41
NTSTATUS (*brl_lock_windows_fn)(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock);
+ struct lock_struct *plock);
bool (*brl_unlock_windows_fn)(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
const struct smb_filename *smb_fname);
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 lock_struct *plock);
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 smb_filename *smb_fname);
NTSTATUS vfs_not_implemented_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock);
+ struct lock_struct *plock);
bool vfs_not_implemented_brl_unlock_windows(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
#define SMB_VFS_NEXT_CONNECTPATH(conn, smb_fname) \
smb_vfs_call_connectpath((conn)->next, (smb_fname))
-#define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock) \
- smb_vfs_call_brl_lock_windows((conn)->vfs_handles, (br_lck), (plock), (blocking_lock))
-#define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock) \
- smb_vfs_call_brl_lock_windows((handle)->next, (br_lck), (plock), (blocking_lock))
+#define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock) \
+ smb_vfs_call_brl_lock_windows((conn)->vfs_handles, (br_lck), (plock))
+#define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock) \
+ smb_vfs_call_brl_lock_windows((handle)->next, (br_lck), (plock))
#define SMB_VFS_BRL_UNLOCK_WINDOWS(conn, msg_ctx, br_lck, plock) \
smb_vfs_call_brl_unlock_windows((conn)->vfs_handles, (msg_ctx), (br_lck), (plock))
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 lock_struct *plock)
{
VFS_FIND(brl_lock_windows);
- return handle->fns->brl_lock_windows_fn(handle, br_lck, plock,
- blocking_lock);
+ return handle->fns->brl_lock_windows_fn(handle, br_lck, plock);
}
/****************************************************************************
if (lock_flav == WINDOWS_LOCK) {
ret = SMB_VFS_BRL_LOCK_WINDOWS(
- br_lck->fsp->conn, br_lck, &lock, false);
+ br_lck->fsp->conn, br_lck, &lock);
} else {
ret = brl_lock_posix(msg_ctx, br_lck, &lock);
}
/* sort the lock list */
TYPESAFE_QSORT(br_lck->lock_data, (size_t)br_lck->num_locks, lock_compare);
#endif
-
/* If we're returning an error, return who blocked us. */
if (!NT_STATUS_IS_OK(ret) && psmblctx) {
*blocker_pid = lock.context.pid;
static NTSTATUS vfswrap_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock)
+ struct lock_struct *plock)
{
SMB_ASSERT(plock->lock_flav == WINDOWS_LOCK);
/* Note: blr is not used in the default implementation. */
- return brl_lock_windows_default(br_lck, plock, blocking_lock);
+ return brl_lock_windows_default(br_lck, plock, false);
}
static bool vfswrap_brl_unlock_windows(struct vfs_handle_struct *handle,
static NTSTATUS smb_full_audit_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock)
+ struct lock_struct *plock)
{
NTSTATUS result;
- result = SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock,
- blocking_lock);
+ result = SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock);
do_log(SMB_VFS_OP_BRL_LOCK_WINDOWS, NT_STATUS_IS_OK(result), handle,
- "%s:%llu-%llu. type=%d. blocking=%d",
+ "%s:%llu-%llu. type=%d.",
fsp_str_do_log(brl_fsp(br_lck)),
(unsigned long long)plock->start,
(unsigned long long)plock->size,
- plock->lock_type,
- blocking_lock);
+ plock->lock_type);
return result;
}
NTSTATUS vfs_not_implemented_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock)
+ struct lock_struct *plock)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
static NTSTATUS smb_time_audit_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
- struct lock_struct *plock,
- bool blocking_lock)
+ struct lock_struct *plock)
{
NTSTATUS result;
struct timespec ts1,ts2;
double timediff;
clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock,
- blocking_lock);
+ result = SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock);
clock_gettime_mono(&ts2);
timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;