mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
s3:smbd: avoid remove_oplock() in close_remove_share_mode()
This inlines remove_oplock() into close_remove_share_mode() and calls remove_share_oplock() and release_file_oplock() directly. The idea is that we'll soon call remove_share_oplock() under a tdb chainlock, while release_file_oplock() needs to be called outside. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
ac811f6f8c
commit
0f02f68f9f
@ -315,8 +315,19 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
|
||||
}
|
||||
|
||||
/* Remove the oplock before potentially deleting the file. */
|
||||
if(fsp->oplock_type) {
|
||||
remove_oplock(fsp);
|
||||
if (fsp->oplock_type != NO_OPLOCK) {
|
||||
bool ok;
|
||||
|
||||
ok = remove_share_oplock(lck, fsp);
|
||||
if (!ok) {
|
||||
struct file_id_buf buf;
|
||||
|
||||
DBG_ERR("failed to remove share oplock for "
|
||||
"file %s, %s, %s\n",
|
||||
fsp_str_dbg(fsp), fsp_fnum_dbg(fsp),
|
||||
file_id_str_buf(fsp->file_id, &buf));
|
||||
}
|
||||
release_file_oplock(fsp);
|
||||
}
|
||||
|
||||
if (fsp->fsp_flags.write_time_forced) {
|
||||
|
Loading…
Reference in New Issue
Block a user