From 31ebc956e5f17fef8411b5fef1a6529df072df2a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Sep 1998 18:09:17 +0000 Subject: Fixed problems with premature kernel oplock checkin code. The ./configure & build now seem to work ok. Jeremy. (This used to be commit 7c1a5ed1c2a55543d3f3c8bbd38e6c9c35b80390) --- source3/include/proto.h | 2 +- source3/smbd/open.c | 10 +++++----- source3/smbd/oplock.c | 3 +-- source3/smbd/reply.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index df6cb7ddcd..6c63df7e30 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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); diff --git a/source3/smbd/open.c b/source3/smbd/open.c index abbc0d6741..0d8fcddbe5 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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) diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 962043380d..94e8559d2a 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -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()); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 1aa4cb988e..ad1894358a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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) { -- cgit