summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-10-27 11:55:34 -0700
committerKarolin Seeger <kseeger@samba.org>2010-01-13 14:00:54 +0100
commit40dfe4df2002d9d852dcb3a3dfe7c719336ea7bd (patch)
tree47bc6b974d4809f860bab5ad5bac6b27f42dbce9
parentb16230c603cb21d24e150ac04f868def227bc934 (diff)
downloadsamba-40dfe4df2002d9d852dcb3a3dfe7c719336ea7bd.tar.gz
samba-40dfe4df2002d9d852dcb3a3dfe7c719336ea7bd.tar.xz
samba-40dfe4df2002d9d852dcb3a3dfe7c719336ea7bd.zip
Second part of the fix for bug 6828 - infinite timeout occurs when byte lock held outside of samba. Fixes case where a connection with a pending lock can me marked "idle", and ensures that the lock queue timeout is always recalculated. Jeremy.
(cherry picked from commit 31bb625273aac6e3e19f95465580b3bcb1885549)
-rw-r--r--source/smbd/blocking.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c
index f4adc0d047d..41cbb4a128c 100644
--- a/source/smbd/blocking.c
+++ b/source/smbd/blocking.c
@@ -696,7 +696,6 @@ static void process_blocking_lock_queue(void)
{
struct timeval tv_curr = timeval_current();
blocking_lock_record *blr, *next = NULL;
- bool recalc_timeout = False;
/*
* Go through the queue and see if we can get any of the locks.
@@ -746,7 +745,6 @@ static void process_blocking_lock_queue(void)
blocking_lock_reply_error(blr,NT_STATUS_ACCESS_DENIED);
DLIST_REMOVE(blocking_lock_queue, blr);
free_blocking_lock_record(blr);
- recalc_timeout = True;
continue;
}
@@ -771,7 +769,6 @@ static void process_blocking_lock_queue(void)
blocking_lock_reply_error(blr,NT_STATUS_ACCESS_DENIED);
DLIST_REMOVE(blocking_lock_queue, blr);
free_blocking_lock_record(blr);
- recalc_timeout = True;
change_to_root_user();
continue;
}
@@ -797,7 +794,6 @@ static void process_blocking_lock_queue(void)
DLIST_REMOVE(blocking_lock_queue, blr);
free_blocking_lock_record(blr);
- recalc_timeout = True;
change_to_root_user();
continue;
}
@@ -833,13 +829,10 @@ static void process_blocking_lock_queue(void)
blocking_lock_reply_error(blr,NT_STATUS_FILE_LOCK_CONFLICT);
DLIST_REMOVE(blocking_lock_queue, blr);
free_blocking_lock_record(blr);
- recalc_timeout = True;
}
}
- if (recalc_timeout) {
- recalc_brl_timeout();
- }
+ recalc_brl_timeout();
}
/****************************************************************************