From 636f146abf0a75cd3b21a57b50627ee149a635ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 6 Oct 2000 03:21:49 +0000 Subject: Restructuring of vfs layer to include a "this" pointer - can be an fsp or a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy. (This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5) --- source3/locking/posix.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/locking/posix.c') diff --git a/source3/locking/posix.c b/source3/locking/posix.c index 69df55ba3c..7bac1ffe37 100644 --- a/source3/locking/posix.c +++ b/source3/locking/posix.c @@ -204,7 +204,7 @@ int fd_close_posix(struct connection_struct *conn, files_struct *fsp) /* * No POSIX to worry about, just close. */ - ret = conn->vfs_ops.close(fsp->fd); + ret = conn->vfs_ops.close(fsp,fsp->fd); fsp->fd = -1; return ret; } @@ -259,7 +259,7 @@ int fd_close_posix(struct connection_struct *conn, files_struct *fsp) DEBUG(10,("fd_close_posix: doing close on %u fd's.\n", (unsigned int)count )); for(i = 0; i < count; i++) { - if (conn->vfs_ops.close(fd_array[i]) == -1) { + if (conn->vfs_ops.close(fsp,fd_array[i]) == -1) { saved_errno = errno; } } @@ -279,7 +279,7 @@ int fd_close_posix(struct connection_struct *conn, files_struct *fsp) * Finally close the fd associated with this fsp. */ - ret = conn->vfs_ops.close(fsp->fd); + ret = conn->vfs_ops.close(fsp,fsp->fd); if (saved_errno != 0) { errno = saved_errno; @@ -688,7 +688,7 @@ static BOOL posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF DEBUG(8,("posix_fcntl_lock %d %d %.0f %.0f %d\n",fsp->fd,op,(double)offset,(double)count,type)); - ret = conn->vfs_ops.lock(fsp->fd,op,offset,count,type); + ret = conn->vfs_ops.lock(fsp,fsp->fd,op,offset,count,type); if (!ret && (errno == EFBIG)) { if( DEBUGLVL( 0 )) { @@ -699,7 +699,7 @@ static BOOL posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF /* 32 bit NFS file system, retry with smaller offset */ errno = 0; count &= 0x7fffffff; - ret = conn->vfs_ops.lock(fsp->fd,op,offset,count,type); + ret = conn->vfs_ops.lock(fsp,fsp->fd,op,offset,count,type); } /* A lock query - just return. */ @@ -727,7 +727,7 @@ static BOOL posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF count = (orig_count & 0x7FFFFFFF); offset = (SMB_OFF_T)map_lock_offset(off_high, off_low); - ret = conn->vfs_ops.lock(fsp->fd,op,offset,count,type); + ret = conn->vfs_ops.lock(fsp,fsp->fd,op,offset,count,type); if (!ret) { if (errno == EINVAL) { DEBUG(3,("posix_fcntl_lock: locking not supported? returning True\n")); -- cgit