summaryrefslogtreecommitdiff
path: root/source3/smbd/oplock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/oplock.c')
-rw-r--r--source3/smbd/oplock.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index f20885a7e1..14b243b36e 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -83,6 +83,16 @@ BOOL receive_local_message( char *buffer, int buffer_len, int timeout)
FD_ZERO(&fds);
smb_read_error = 0;
+ /*
+ * We need to check for kernel oplocks before going into the select
+ * here, as the EINTR generated by the linux kernel oplock may have
+ * already been eaten. JRA.
+ */
+
+ if (koplocks && koplocks->msg_waiting(&fds)) {
+ return koplocks->receive_message(&fds, buffer, buffer_len);
+ }
+
while (timeout > 0 && selrtn == -1) {
struct timeval to;
int maxfd = oplock_sock;