diff options
Diffstat (limited to 'source/locking/posix.c')
-rw-r--r-- | source/locking/posix.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/locking/posix.c b/source/locking/posix.c index 6173c80b2fd..81690bace9f 100644 --- a/source/locking/posix.c +++ b/source/locking/posix.c @@ -192,7 +192,7 @@ static size_t get_posix_lock_entries(files_struct *fsp, struct posix_lock **entr to delete all locks on this fsp before this function is called. ****************************************************************************/ -int fd_close_posix(struct connection_struct *conn, files_struct *fsp) +int fd_close_posix(struct tcon_context *conn, files_struct *fsp) { int saved_errno = 0; int ret; @@ -205,7 +205,7 @@ int fd_close_posix(struct connection_struct *conn, files_struct *fsp) /* * No POSIX to worry about, just close. */ - ret = SMB_VFS_CLOSE(fsp,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 (SMB_VFS_CLOSE(fsp,fd_array[i]) == -1) { + if (conn->vfs_ops.close(fsp,fd_array[i]) == -1) { saved_errno = errno; } } @@ -278,7 +278,7 @@ int fd_close_posix(struct connection_struct *conn, files_struct *fsp) * Finally close the fd associated with this fsp. */ - ret = SMB_VFS_CLOSE(fsp,fsp->fd); + ret = conn->vfs_ops.close(fsp,fsp->fd); if (saved_errno != 0) { errno = saved_errno; @@ -646,10 +646,11 @@ static BOOL posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out, static BOOL posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) { int ret; + struct tcon_context *conn = fsp->conn; DEBUG(8,("posix_fcntl_lock %d %d %.0f %.0f %d\n",fsp->fd,op,(double)offset,(double)count,type)); - ret = SMB_VFS_LOCK(fsp,fsp->fd,op,offset,count,type); + ret = conn->vfs_ops.lock(fsp,fsp->fd,op,offset,count,type); if (!ret && ((errno == EFBIG) || (errno == ENOLCK) || (errno == EINVAL))) { @@ -673,7 +674,7 @@ static BOOL posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF DEBUG(0,("Count greater than 31 bits - retrying with 31 bit truncated length.\n")); errno = 0; count &= 0x7fffffff; - ret = SMB_VFS_LOCK(fsp,fsp->fd,op,offset,count,type); + ret = conn->vfs_ops.lock(fsp,fsp->fd,op,offset,count,type); } } |