summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-07-01 14:55:42 +0200
committerJeremy Allison <jra@samba.org>2019-07-02 17:01:27 +0000
commitf83775d8557587c1aa6db031c0b250455d4d7a6b (patch)
tree454a00704936aaf44056c3bd10194ae1282f0b07
parent37c9c4c3ce3e26730f79bce5feaf51433bd331f7 (diff)
downloadsamba-f83775d8557587c1aa6db031c0b250455d4d7a6b.tar.gz
vfs: Remove "blocking_lock" from SMB_VFS_BRL_LOCK_WINDOWS
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--examples/VFS/skel_opaque.c3
-rw-r--r--examples/VFS/skel_transparent.c6
-rw-r--r--source3/include/vfs.h11
-rw-r--r--source3/include/vfs_macros.h8
-rw-r--r--source3/locking/brlock.c9
-rw-r--r--source3/modules/vfs_default.c5
-rw-r--r--source3/modules/vfs_full_audit.c11
-rw-r--r--source3/modules/vfs_not_implemented.c3
-rw-r--r--source3/modules/vfs_time_audit.c6
9 files changed, 24 insertions, 38 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 4e4475a11e8..1d4f28d1d28 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -647,8 +647,7 @@ static const char *skel_connectpath(struct vfs_handle_struct *handle,
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;
}
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index ac2665ef07b..fd5d2296559 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -818,11 +818,9 @@ static const char *skel_connectpath(struct vfs_handle_struct *handle,
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,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 56f4b9dd1f8..f4ae10429b8 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -266,6 +266,8 @@
/* 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
@@ -870,8 +872,7 @@ struct vfs_fn_pointers {
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,
@@ -1345,8 +1346,7 @@ const char *smb_vfs_call_connectpath(struct vfs_handle_struct *handle,
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,
@@ -1808,8 +1808,7 @@ const char *vfs_not_implemented_connectpath(struct vfs_handle_struct *handle,
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,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index c4fa0fe022e..2c1a9d1cd16 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -351,10 +351,10 @@
#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))
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 7d67f271ab2..f3ef9095639 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -892,12 +892,10 @@ static NTSTATUS brl_lock_posix(struct messaging_context *msg_ctx,
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);
}
/****************************************************************************
@@ -939,7 +937,7 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx,
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);
}
@@ -948,7 +946,6 @@ NTSTATUS brl_lock(struct messaging_context *msg_ctx,
/* 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;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 68d9200ce88..13bfe455270 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2835,13 +2835,12 @@ static const char *vfswrap_connectpath(struct vfs_handle_struct *handle,
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,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index b20bca0a528..60802b8eb11 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -1886,21 +1886,18 @@ static const char *smb_full_audit_connectpath(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;
}
diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c
index aa7068ed073..93a49722cfe 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -650,8 +650,7 @@ const char *vfs_not_implemented_connectpath(struct vfs_handle_struct *handle,
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;
}
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 8e1c794c037..563490bf94c 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1608,16 +1608,14 @@ static const char *smb_time_audit_connectpath(vfs_handle_struct *handle,
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;