mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
smbd: Make remove_oplock_under_lock static
We have support for nested get_share_mode_lock calls, so we can avoid this additional function. It's one more talloc/free per close, but I hope this can't be measurable. Our open/close path is pretty expensive anyway. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
e4d5c53e80
commit
e28c2ee903
@ -306,7 +306,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
|
||||
|
||||
/* Remove the oplock before potentially deleting the file. */
|
||||
if(fsp->oplock_type) {
|
||||
remove_oplock_under_lock(fsp, lck);
|
||||
remove_oplock(fsp);
|
||||
}
|
||||
|
||||
if (fsp->write_time_forced) {
|
||||
|
@ -199,7 +199,7 @@ uint32_t get_lease_type(const struct share_mode_data *d,
|
||||
Remove a file oplock with lock already held. Copes with level II and exclusive.
|
||||
****************************************************************************/
|
||||
|
||||
bool remove_oplock_under_lock(files_struct *fsp, struct share_mode_lock *lck)
|
||||
static bool remove_oplock_under_lock(files_struct *fsp, struct share_mode_lock *lck)
|
||||
{
|
||||
bool ret;
|
||||
|
||||
|
@ -719,7 +719,6 @@ uint32_t get_lease_type(const struct share_mode_data *d,
|
||||
|
||||
void break_kernel_oplock(struct messaging_context *msg_ctx, files_struct *fsp);
|
||||
NTSTATUS set_file_oplock(files_struct *fsp);
|
||||
bool remove_oplock_under_lock(files_struct *fsp, struct share_mode_lock *lck);
|
||||
bool remove_oplock(files_struct *fsp);
|
||||
bool downgrade_oplock(files_struct *fsp);
|
||||
bool fsp_lease_update(struct files_struct *fsp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user