Skip to content

Commit

Permalink
vfs: Remove unused "msg_ctx" from SMB_VFS_BRL_UNLOCK_WINDOWS
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
vlendec authored and jrasamba committed Jul 2, 2019
1 parent 3a93c63 commit 39f14da
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 30 deletions.
1 change: 0 additions & 1 deletion examples/VFS/skel_opaque.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
}

static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock)
{
Expand Down
3 changes: 1 addition & 2 deletions examples/VFS/skel_transparent.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,11 +824,10 @@ static NTSTATUS skel_brl_lock_windows(struct vfs_handle_struct *handle,
}

static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock)
{
return SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock);
return SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, br_lck, plock);
}

static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
Expand Down
4 changes: 1 addition & 3 deletions source3/include/vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
/* Version 41 - add SMB_VFS_FS_FILE_ID */
/* Version 41 - Remove "blocking_lock" parameter from
SMB_VFS_BRL_LOCK_WINDOWS */
/* Version 41 - Remove "msg_ctx" parameter from SMB_VFS_BRL_UNLOCK_WINDOWS */

#define SMB_VFS_INTERFACE_VERSION 41

Expand Down Expand Up @@ -875,7 +876,6 @@ struct vfs_fn_pointers {
struct lock_struct *plock);

bool (*brl_unlock_windows_fn)(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock);

Expand Down Expand Up @@ -1348,7 +1348,6 @@ NTSTATUS smb_vfs_call_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
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 lock_struct *plock);
bool smb_vfs_call_strict_lock_check(struct vfs_handle_struct *handle,
Expand Down Expand Up @@ -1810,7 +1809,6 @@ NTSTATUS vfs_not_implemented_brl_lock_windows(struct vfs_handle_struct *handle,
struct byte_range_lock *br_lck,
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,
const struct lock_struct *plock);
bool vfs_not_implemented_strict_lock_check(struct vfs_handle_struct *handle,
Expand Down
8 changes: 4 additions & 4 deletions source3/include/vfs_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@
#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))
#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_UNLOCK_WINDOWS(conn, br_lck, plock) \
smb_vfs_call_brl_unlock_windows((conn)->vfs_handles, (br_lck), (plock))
#define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, br_lck, plock) \
smb_vfs_call_brl_unlock_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))
Expand Down
13 changes: 5 additions & 8 deletions source3/locking/brlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,9 +968,8 @@ static void brl_delete_lock_struct(struct lock_struct *locks,
Unlock a range of bytes - Windows semantics.
****************************************************************************/

bool brl_unlock_windows_default(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock)
bool brl_unlock_windows_default(struct byte_range_lock *br_lck,
const struct lock_struct *plock)
{
unsigned int i;
struct lock_struct *locks = br_lck->lock_data;
Expand Down Expand Up @@ -1181,13 +1180,11 @@ static bool brl_unlock_posix(struct byte_range_lock *br_lck,
}

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_fn(handle, msg_ctx, br_lck,
plock);
return handle->fns->brl_unlock_windows_fn(handle, br_lck, plock);
}

/****************************************************************************
Expand All @@ -1214,8 +1211,8 @@ bool brl_unlock(struct messaging_context *msg_ctx,
lock.lock_flav = lock_flav;

if (lock_flav == WINDOWS_LOCK) {
return SMB_VFS_BRL_UNLOCK_WINDOWS(br_lck->fsp->conn, msg_ctx,
br_lck, &lock);
return SMB_VFS_BRL_UNLOCK_WINDOWS(
br_lck->fsp->conn, br_lck, &lock);
} else {
return brl_unlock_posix(br_lck, &lock);
}
Expand Down
5 changes: 2 additions & 3 deletions source3/locking/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ bool brl_unlock(struct messaging_context *msg_ctx,
br_off start,
br_off size,
enum brl_flavour lock_flav);
bool brl_unlock_windows_default(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock);
bool brl_unlock_windows_default(struct byte_range_lock *br_lck,
const struct lock_struct *plock);
bool brl_locktest(struct byte_range_lock *br_lck,
const struct lock_struct *rw_probe);
NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
Expand Down
3 changes: 1 addition & 2 deletions source3/modules/vfs_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -2844,13 +2844,12 @@ static NTSTATUS vfswrap_brl_lock_windows(struct vfs_handle_struct *handle,
}

static bool vfswrap_brl_unlock_windows(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock)
{
SMB_ASSERT(plock->lock_flav == WINDOWS_LOCK);

return brl_unlock_windows_default(msg_ctx, br_lck, plock);
return brl_unlock_windows_default(br_lck, plock);
}

static bool vfswrap_strict_lock_check(struct vfs_handle_struct *handle,
Expand Down
4 changes: 1 addition & 3 deletions source3/modules/vfs_full_audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1903,14 +1903,12 @@ static NTSTATUS smb_full_audit_brl_lock_windows(struct vfs_handle_struct *handle
}

static bool smb_full_audit_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 result;

result = SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck,
plock);
result = SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, br_lck, plock);

do_log(SMB_VFS_OP_BRL_UNLOCK_WINDOWS, (result == 0), handle,
"%s:%llu-%llu:%d", fsp_str_do_log(brl_fsp(br_lck)),
Expand Down
1 change: 0 additions & 1 deletion source3/modules/vfs_not_implemented.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,6 @@ NTSTATUS vfs_not_implemented_brl_lock_windows(struct vfs_handle_struct *handle,
}

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)
{
Expand Down
4 changes: 1 addition & 3 deletions source3/modules/vfs_time_audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,6 @@ static NTSTATUS smb_time_audit_brl_lock_windows(struct vfs_handle_struct *handle
}

static bool smb_time_audit_brl_unlock_windows(struct vfs_handle_struct *handle,
struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock)
{
Expand All @@ -1637,8 +1636,7 @@ static bool smb_time_audit_brl_unlock_windows(struct vfs_handle_struct *handle,
double timediff;

clock_gettime_mono(&ts1);
result = SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck,
plock);
result = SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, br_lck, plock);
clock_gettime_mono(&ts2);
timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;

Expand Down

0 comments on commit 39f14da

Please sign in to comment.