From: Volker Lendecke Date: Tue, 3 Dec 2019 09:36:21 +0000 (+0100) Subject: smbd: Pass num_share_modes to share_mode_entry_do() callback X-Git-Tag: ldb-2.1.0~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21eff9d18d23ddc232a566eca51a6f32e30f0c11;p=thirdparty%2Fsamba.git smbd: Pass num_share_modes to share_mode_entry_do() callback mark_share_mode_disconnected_fn() will need this, the information is easily available and should not hurt the other callers. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index f43cbd287d3..8ffb0135f68 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -1888,6 +1888,7 @@ struct share_mode_entry_do_state { struct server_id pid; uint64_t share_file_id; void (*fn)(struct share_mode_entry *e, + size_t num_share_modes, bool *modified, void *private_data); void *private_data; @@ -1932,7 +1933,7 @@ static void share_mode_entry_do_fn( return; } - state->fn(&e, &modified, state->private_data); + state->fn(&e, state->num_share_modes, &modified, state->private_data); if (!e.stale && !modified) { state->status = NT_STATUS_OK; @@ -1998,6 +1999,7 @@ static bool share_mode_entry_do( struct server_id pid, uint64_t share_file_id, void (*fn)(struct share_mode_entry *e, + size_t num_share_modes, bool *modified, void *private_data), void *private_data) @@ -2041,6 +2043,7 @@ struct del_share_mode_state { static void del_share_mode_fn( struct share_mode_entry *e, + size_t num_share_modes, bool *modified, void *private_data) { @@ -2077,6 +2080,7 @@ struct remove_share_oplock_state { static void remove_share_oplock_fn( struct share_mode_entry *e, + size_t num_share_modes, bool *modified, void *private_data) { @@ -2125,6 +2129,7 @@ struct downgrade_share_oplock_state { static void downgrade_share_oplock_fn( struct share_mode_entry *e, + size_t num_share_modes, bool *modified, void *private_data) { @@ -2168,6 +2173,7 @@ struct mark_share_mode_disconnected_state { static void mark_share_mode_disconnected_fn( struct share_mode_entry *e, + size_t num_share_modes, bool *modified, void *private_data) { @@ -2220,6 +2226,7 @@ bool mark_share_mode_disconnected(struct share_mode_lock *lck, static void reset_share_mode_entry_del_fn( struct share_mode_entry *e, + size_t num_share_modes, bool *modified, void *private_data) {