1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Fixed problems with premature kernel oplock checkin code.

The ./configure & build now seem to work ok.

Jeremy.
This commit is contained in:
Jeremy Allison -
parent f939efac9e
commit 7c1a5ed1c2
4 changed files with 8 additions and 9 deletions

View File

@ -1801,7 +1801,7 @@ int reply_nttrans(connection_struct *conn,
void fd_add_to_uid_cache(file_fd_struct *fd_ptr, uid_t u);
uint16 fd_attempt_close(file_fd_struct *fd_ptr);
void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int share_mode,int ofun,
mode_t mode,int *oplock_request, int *Access,int *action);
mode_t mode,int oplock_request, int *Access,int *action);
int open_directory(files_struct *fsp,connection_struct *conn,
char *fname, int smb_ofun, mode_t unixmode, int *action);
BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op);

View File

@ -687,7 +687,7 @@ static int check_share_mode( share_mode_entry *share, int deny_mode,
open a file with a share mode
****************************************************************************/
void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int share_mode,int ofun,
mode_t mode,int *oplock_request, int *Access,int *action)
mode_t mode,int oplock_request, int *Access,int *action)
{
int flags=0;
int flags2=0;
@ -922,7 +922,7 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou
be extended to level II oplocks (multiple reader
oplocks). */
if((*oplock_request) && (num_share_modes == 0) && lp_oplocks(SNUM(conn)) &&
if((oplock_request) && (num_share_modes == 0) && lp_oplocks(SNUM(conn)) &&
!IS_VETO_OPLOCK_PATH(conn,fname))
{
#if defined(HAVE_KERNEL_OPLOCKS)
@ -941,15 +941,15 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou
port = oplock_port;
DEBUG(5,("open_file_shared: granted oplock (%x) on file %s, \
dev = %x, inode = %.0f\n", *oplock_request, fname, (unsigned int)dev, (double)inode));
dev = %x, inode = %.0f\n", oplock_request, fname, (unsigned int)dev, (double)inode));
}
else
{
port = 0;
*oplock_request = 0;
oplock_request = 0;
}
set_share_mode(token, fsp, port, *oplock_request);
set_share_mode(token, fsp, port, oplock_request);
}
if ((flags2&O_TRUNC) && file_existed)

View File

@ -30,7 +30,6 @@ uint16 oplock_port = 0;
static int oplock_pipes[2];
#endif /* HAVE_KERNEL_OPLOCKS */
int oplock
/* Current number of oplocks we have outstanding. */
int32 global_oplocks_open = 0;
BOOL global_oplock_break = False;
@ -697,7 +696,7 @@ void check_kernel_oplocks(BOOL *have_oplocks)
return;
done = True;
*have_oplocks = False
*have_oplocks = False;
#if defined(HAVE_KERNEL_OPLOCKS)
slprintf( tmpname, sizeof(tmpname)-1, "/tmp/ot.%d.XXXXXX", getpid());

View File

@ -1373,7 +1373,7 @@ int reply_open_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
unixmode = unix_mode(conn,smb_attr | aARCH);
open_file_shared(fsp,conn,fname,smb_mode,smb_ofun,unixmode,
oplock_request, &rmode,&smb_action);
oplock_request, &rmode,&smb_action);
if (!fsp->open)
{