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>
/* 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) {
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;
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);