diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 19896a789db..5b3741bb865 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -322,7 +322,8 @@ files_struct *file_find_dif(struct smbd_server_connection *sconn, } /* Paranoia check. */ if ((fsp->fh->fd == -1) && - (fsp->oplock_type != NO_OPLOCK)) { + (fsp->oplock_type != NO_OPLOCK && + fsp->oplock_type != LEASE_OPLOCK)) { DEBUG(0,("file_find_dif: file %s file_id = " "%s, gen = %u oplock_type = %u is a " "stat open with oplock type !\n",