From: Volker Lendecke Date: Wed, 4 Sep 2013 11:57:00 +0000 (+0200) Subject: smbd: Fix an ancient oplock bug X-Git-Tag: samba-4.0.15~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e398837bab5e520429fc93e3277f00b6081559c;p=thirdparty%2Fsamba.git smbd: Fix an ancient oplock bug If we get an oplock break response, we forgot to remove the oplock break timeout. Found by stopping raw.oplock.exclusive5 after the 2nd open and watching a debug level 10 log. This amends 08a9de89 from 2007. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit 0670975261c5f29394f9e9d25f899a7de948dad1) Fix bug #10436 - cancel fsp->oplock_timeout in downgrade_file_oplock(). --- diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 406ffd1e3d4..95d88ef3813 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -150,6 +150,8 @@ static void downgrade_file_oplock(files_struct *fsp) sconn->oplocks.exclusive_open--; sconn->oplocks.level_II_open++; fsp->sent_oplock_break = NO_BREAK_SENT; + + TALLOC_FREE(fsp->oplock_timeout); } /****************************************************************************