summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-06-20 13:42:12 +0200
committerJeremy Allison <jra@samba.org>2019-06-20 18:34:20 +0000
commit4bbe291efcb389715651b2eb94330b6c36f83030 (patch)
tree7fda5f821afab0ded954145e3b3c85b3d65a59ea
parent871bb7562cad1d4a9dccab602880d2ef3fffd75c (diff)
downloadsamba-4bbe291efcb389715651b2eb94330b6c36f83030.tar.gz
vfs: Remove SMB_VFS_BRL_CANCEL_WINDOWS
This is not called anymore, bump the VFS version number in a separate commit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 20 18:34:20 UTC 2019 on sn-devel-184
-rw-r--r--examples/VFS/skel_opaque.c9
-rw-r--r--examples/VFS/skel_transparent.c8
-rw-r--r--source3/include/vfs.h14
-rw-r--r--source3/include/vfs_macros.h5
-rw-r--r--source3/locking/brlock.c14
-rw-r--r--source3/locking/proto.h2
-rw-r--r--source3/modules/vfs_default.c11
-rw-r--r--source3/modules/vfs_full_audit.c20
-rw-r--r--source3/modules/vfs_glusterfs.c1
-rw-r--r--source3/modules/vfs_not_implemented.c9
-rw-r--r--source3/modules/vfs_time_audit.c22
11 files changed, 3 insertions, 112 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 6510ef30d6f..6628bffe3eb 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -655,14 +655,6 @@ static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
return false;
}
-static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- errno = ENOSYS;
- return false;
-}
-
static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock)
@@ -1104,7 +1096,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.connectpath_fn = skel_connectpath,
.brl_lock_windows_fn = skel_brl_lock_windows,
.brl_unlock_windows_fn = skel_brl_unlock_windows,
- .brl_cancel_windows_fn = skel_brl_cancel_windows,
.strict_lock_check_fn = skel_strict_lock_check,
.translate_name_fn = skel_translate_name,
.fsctl_fn = skel_fsctl,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index fc892a23208..9b5f336042e 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -827,13 +827,6 @@ static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
return SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock);
}
-static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- return SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
-}
-
static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock)
@@ -1367,7 +1360,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.connectpath_fn = skel_connectpath,
.brl_lock_windows_fn = skel_brl_lock_windows,
.brl_unlock_windows_fn = skel_brl_unlock_windows,
- .brl_cancel_windows_fn = skel_brl_cancel_windows,
.strict_lock_check_fn = skel_strict_lock_check,
.translate_name_fn = skel_translate_name,
.fsctl_fn = skel_fsctl,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 6f6bdbf28ad..4727fc029da 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -259,8 +259,10 @@
/* Bump to version 40, Samba 4.10 will ship with that */
/* Version 40 - Add SMB_VFS_GETXATTRAT_SEND/RECV */
/* Version 40 - Add SMB_VFS_GET_DOS_ATTRIBUTES_SEND/RECV */
+/* Bump to version 41, Samba 4.11 will ship with that */
+/* Version 41 - Remove SMB_VFS_BRL_CANCEL_WINDOWS */
-#define SMB_VFS_INTERFACE_VERSION 40
+#define SMB_VFS_INTERFACE_VERSION 41
/*
All intercepted VFS operations must be declared as static functions inside module source
@@ -870,10 +872,6 @@ struct vfs_fn_pointers {
struct byte_range_lock *br_lck,
const struct lock_struct *plock);
- bool (*brl_cancel_windows_fn)(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock);
-
bool (*strict_lock_check_fn)(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock);
@@ -1345,9 +1343,6 @@ 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);
-bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock);
bool smb_vfs_call_strict_lock_check(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock);
@@ -1809,9 +1804,6 @@ bool vfs_not_implemented_brl_unlock_windows(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock);
-bool vfs_not_implemented_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock);
bool vfs_not_implemented_strict_lock_check(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 7a0f14ef08d..e867810f30f 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -356,11 +356,6 @@
#define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock) \
smb_vfs_call_brl_unlock_windows((handle)->next, (msg_ctx), (br_lck), (plock))
-#define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock) \
- smb_vfs_call_brl_cancel_windows((conn)->vfs_handles, (br_lck), (plock))
-#define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock) \
- smb_vfs_call_brl_cancel_windows((handle)->next, (br_lck), (plock))
-
#define SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, plock) \
smb_vfs_call_strict_lock_check((conn)->vfs_handles, (fsp), (plock))
#define SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock) \
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index b9a244916bc..00462a31c78 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -1366,20 +1366,6 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
}
-bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- VFS_FIND(brl_cancel_windows);
- return handle->fns->brl_cancel_windows_fn(handle, br_lck, plock);
-}
-
-bool brl_lock_cancel_default(struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- return false;
-}
-
/****************************************************************************
Remove any locks associated with a open file.
We return True if this process owns any other Windows locks on this
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index 49fb66d115c..1e90a40a9ea 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -68,8 +68,6 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
br_off *psize,
enum brl_type *plock_type,
enum brl_flavour lock_flav);
-bool brl_lock_cancel_default(struct byte_range_lock *br_lck,
- struct lock_struct *plock);
bool brl_mark_disconnected(struct files_struct *fsp);
bool brl_reconnect_disconnected(struct files_struct *fsp);
void brl_close_fnum(struct messaging_context *msg_ctx,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 47722d53cec..f2f2ed7f7d1 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2832,16 +2832,6 @@ static bool vfswrap_brl_unlock_windows(struct vfs_handle_struct *handle,
return brl_unlock_windows_default(msg_ctx, br_lck, plock);
}
-static bool vfswrap_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- SMB_ASSERT(plock->lock_flav == WINDOWS_LOCK);
-
- /* Note: blr is not used in the default implementation. */
- return brl_lock_cancel_default(br_lck, plock);
-}
-
static bool vfswrap_strict_lock_check(struct vfs_handle_struct *handle,
files_struct *fsp,
struct lock_struct *plock)
@@ -3462,7 +3452,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.connectpath_fn = vfswrap_connectpath,
.brl_lock_windows_fn = vfswrap_brl_lock_windows,
.brl_unlock_windows_fn = vfswrap_brl_unlock_windows,
- .brl_cancel_windows_fn = vfswrap_brl_cancel_windows,
.strict_lock_check_fn = vfswrap_strict_lock_check,
.translate_name_fn = vfswrap_translate_name,
.fsctl_fn = vfswrap_fsctl,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index a4e2afa0dbb..8c4dc44dc5d 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -163,7 +163,6 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_CONNECTPATH,
SMB_VFS_OP_BRL_LOCK_WINDOWS,
SMB_VFS_OP_BRL_UNLOCK_WINDOWS,
- SMB_VFS_OP_BRL_CANCEL_WINDOWS,
SMB_VFS_OP_STRICT_LOCK_CHECK,
SMB_VFS_OP_TRANSLATE_NAME,
SMB_VFS_OP_FSCTL,
@@ -306,7 +305,6 @@ static struct {
{ SMB_VFS_OP_CONNECTPATH, "connectpath" },
{ SMB_VFS_OP_BRL_LOCK_WINDOWS, "brl_lock_windows" },
{ SMB_VFS_OP_BRL_UNLOCK_WINDOWS, "brl_unlock_windows" },
- { SMB_VFS_OP_BRL_CANCEL_WINDOWS, "brl_cancel_windows" },
{ SMB_VFS_OP_STRICT_LOCK_CHECK, "strict_lock_check" },
{ SMB_VFS_OP_TRANSLATE_NAME, "translate_name" },
{ SMB_VFS_OP_FSCTL, "fsctl" },
@@ -1910,23 +1908,6 @@ static bool smb_full_audit_brl_unlock_windows(struct vfs_handle_struct *handle,
return result;
}
-static bool smb_full_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- bool result;
-
- result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
-
- do_log(SMB_VFS_OP_BRL_CANCEL_WINDOWS, (result == 0), handle,
- "%s:%llu-%llu:%d", fsp_str_do_log(brl_fsp(br_lck)),
- (unsigned long long)plock->start,
- (unsigned long long)plock->size,
- plock->lock_type);
-
- return result;
-}
-
static bool smb_full_audit_strict_lock_check(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock)
@@ -2897,7 +2878,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.connectpath_fn = smb_full_audit_connectpath,
.brl_lock_windows_fn = smb_full_audit_brl_lock_windows,
.brl_unlock_windows_fn = smb_full_audit_brl_unlock_windows,
- .brl_cancel_windows_fn = smb_full_audit_brl_cancel_windows,
.strict_lock_check_fn = smb_full_audit_strict_lock_check,
.translate_name_fn = smb_full_audit_translate_name,
.fsctl_fn = smb_full_audit_fsctl,
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index a9415952b4e..e8617215355 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1663,7 +1663,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
.brl_lock_windows_fn = NULL,
.brl_unlock_windows_fn = NULL,
- .brl_cancel_windows_fn = NULL,
.strict_lock_check_fn = NULL,
.translate_name_fn = NULL,
.fsctl_fn = NULL,
diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c
index 214390204a5..d3aca899067 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -658,14 +658,6 @@ bool vfs_not_implemented_brl_unlock_windows(struct vfs_handle_struct *handle,
return false;
}
-bool vfs_not_implemented_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- errno = ENOSYS;
- return false;
-}
-
bool vfs_not_implemented_strict_lock_check(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock)
@@ -1108,7 +1100,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
.connectpath_fn = vfs_not_implemented_connectpath,
.brl_lock_windows_fn = vfs_not_implemented_brl_lock_windows,
.brl_unlock_windows_fn = vfs_not_implemented_brl_unlock_windows,
- .brl_cancel_windows_fn = vfs_not_implemented_brl_cancel_windows,
.strict_lock_check_fn = vfs_not_implemented_strict_lock_check,
.translate_name_fn = vfs_not_implemented_translate_name,
.fsctl_fn = vfs_not_implemented_fsctl,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index a89c6be9f71..96847a4fde9 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1633,27 +1633,6 @@ static bool smb_time_audit_brl_unlock_windows(struct vfs_handle_struct *handle,
return result;
}
-static bool smb_time_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
- struct byte_range_lock *br_lck,
- struct lock_struct *plock)
-{
- bool result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log_fsp("brl_cancel_windows", timediff,
- brl_fsp(br_lck));
- }
-
- return result;
-}
-
static bool smb_time_audit_strict_lock_check(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock)
@@ -2859,7 +2838,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.connectpath_fn = smb_time_audit_connectpath,
.brl_lock_windows_fn = smb_time_audit_brl_lock_windows,
.brl_unlock_windows_fn = smb_time_audit_brl_unlock_windows,
- .brl_cancel_windows_fn = smb_time_audit_brl_cancel_windows,
.strict_lock_check_fn = smb_time_audit_strict_lock_check,
.translate_name_fn = smb_time_audit_translate_name,
.fsctl_fn = smb_time_audit_fsctl,