diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-11-28 03:30:24 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-11-28 03:30:24 +0000 |
commit | f822c17d35921817e19ce0d879788125f361d4b9 (patch) | |
tree | 6e2b56b00485878d8f94cfcac4b4a372faddd795 /source3 | |
parent | 6c158adf25dae3a71203d0dffc6a6018ba02da0d (diff) | |
download | samba-f822c17d35921817e19ce0d879788125f361d4b9.tar.gz samba-f822c17d35921817e19ce0d879788125f361d4b9.tar.bz2 samba-f822c17d35921817e19ce0d879788125f361d4b9.zip |
fixed a very nasty oplock bug. We could send oplock break requests on
files that aren't open if the file happened to close while the oplock
was in transit. We would end up sending a oplock break request on
another random file (actually the open file that happened to have the
highest fnum). Then we wouldn't get a response, so smbd would keep
sending and would actually flood the net with an infinite number of
oplock break requests!
(This used to be commit 0da20e0aecbf3e59bdc649c489a18832403dc9b2)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 3f4f6c7034..8a52ddef69 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -2795,11 +2795,12 @@ global_oplocks_open = %d\n", timestring(), dev, inode, global_oplocks_open)); { if(OPEN_FNUM(fnum)) { - fsp = &Files[fnum]; if((fsp->fd_ptr->dev == dev) && (fsp->fd_ptr->inode == inode) && (fsp->open_time.tv_sec == tval->tv_sec) && - (fsp->open_time.tv_usec == tval->tv_usec)) - break; + (fsp->open_time.tv_usec == tval->tv_usec)) { + fsp = &Files[fnum]; + break; + } } } |