git.samba.org
/
mat
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smbd: Simplify find_oplock_types a bit
[mat/samba.git]
/
source3
/
smbd
/
open.c
diff --git
a/source3/smbd/open.c
b/source3/smbd/open.c
index 93b69d5afd7549b719a1134fc8c9ebb81ddd0f52..29c6eb525d5d216c0f3fa274b2763986e9a35743 100644
(file)
--- a/
source3/smbd/open.c
+++ b/
source3/smbd/open.c
@@
-1217,6
+1217,7
@@
static void find_oplock_types(files_struct *fsp,
bool *got_level2,
bool *got_no_oplock)
{
bool *got_level2,
bool *got_no_oplock)
{
+ struct share_mode_data *d = lck->data;
int i;
*pp_batch = NULL;
int i;
*pp_batch = NULL;
@@
-1232,8
+1233,8
@@
static void find_oplock_types(files_struct *fsp,
return;
}
return;
}
- for (i=0; i<
lck->data
->num_share_modes; i++) {
- struct share_mode_entry *e = &
lck->data
->share_modes[i];
+ for (i=0; i<
d
->num_share_modes; i++) {
+ struct share_mode_entry *e = &
d
->share_modes[i];
if (!is_valid_share_mode_entry(e)) {
continue;
if (!is_valid_share_mode_entry(e)) {
continue;
@@
-1248,7
+1249,7
@@
static void find_oplock_types(files_struct *fsp,
if (BATCH_OPLOCK_TYPE(e->op_type)) {
/* batch - can only be one. */
if (BATCH_OPLOCK_TYPE(e->op_type)) {
/* batch - can only be one. */
- if (share_mode_stale_pid(
lck->data
, i)) {
+ if (share_mode_stale_pid(
d
, i)) {
DEBUG(10, ("Found stale batch oplock\n"));
continue;
}
DEBUG(10, ("Found stale batch oplock\n"));
continue;
}
@@
-1259,7
+1260,7
@@
static void find_oplock_types(files_struct *fsp,
}
if (EXCLUSIVE_OPLOCK_TYPE(e->op_type)) {
}
if (EXCLUSIVE_OPLOCK_TYPE(e->op_type)) {
- if (share_mode_stale_pid(
lck->data
, i)) {
+ if (share_mode_stale_pid(
d
, i)) {
DEBUG(10, ("Found stale duplicate oplock\n"));
continue;
}
DEBUG(10, ("Found stale duplicate oplock\n"));
continue;
}
@@
-1272,7
+1273,7
@@
static void find_oplock_types(files_struct *fsp,
if (LEVEL_II_OPLOCK_TYPE(e->op_type)) {
if (*pp_batch || *pp_ex_or_batch) {
if (LEVEL_II_OPLOCK_TYPE(e->op_type)) {
if (*pp_batch || *pp_ex_or_batch) {
- if (share_mode_stale_pid(
lck->data
, i)) {
+ if (share_mode_stale_pid(
d
, i)) {
DEBUG(10, ("Found stale LevelII "
"oplock\n"));
continue;
DEBUG(10, ("Found stale LevelII "
"oplock\n"));
continue;
@@
-1284,7
+1285,7
@@
static void find_oplock_types(files_struct *fsp,
if (e->op_type == NO_OPLOCK) {
if (*pp_batch || *pp_ex_or_batch) {
if (e->op_type == NO_OPLOCK) {
if (*pp_batch || *pp_ex_or_batch) {
- if (share_mode_stale_pid(
lck->data
, i)) {
+ if (share_mode_stale_pid(
d
, i)) {
DEBUG(10, ("Found stale NO_OPLOCK "
"entry\n"));
continue;
DEBUG(10, ("Found stale NO_OPLOCK "
"entry\n"));
continue;