fsp->oplock_type = NO_OPLOCK;
}
+ if (is_stat_open(fsp->access_mask)) {
+ /* Leave the value already set. */
+ DEBUG(10,("grant_fsp_oplock_type: oplock type 0x%x on file %s\n",
+ fsp->oplock_type, fsp_str_dbg(fsp)));
+ return;
+ }
+
got_level2_oplock = false;
got_a_none_oplock = false;
return status;
}
+ grant_fsp_oplock_type(fsp, lck, oplock_request);
+
/*
* We have the share entry *locked*.....
*/
if (file_existed) {
/* stat opens on existing files don't get oplocks. */
if (is_stat_open(open_access_mask)) {
- oplock_request = NO_OPLOCK;
+ fsp->oplock_type = NO_OPLOCK;
}
}
* file structs.
*/
- grant_fsp_oplock_type(fsp, lck, oplock_request);
-
status = set_file_oplock(fsp);
if (!NT_STATUS_IS_OK(status)) {
/*