diff options
author | Tim Potter <tpot@samba.org> | 1999-04-04 05:32:42 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 1999-04-04 05:32:42 +0000 |
commit | 20bfa71c951a6e6018aafbd43946d1e0669feacb (patch) | |
tree | e908077c7606313a6be07d474421a4bb8622ba66 /source/locking | |
parent | 6998bdbfa886de7feda96a6913024deb723ff13b (diff) | |
download | samba-20bfa71c951a6e6018aafbd43946d1e0669feacb.tar.gz |
Use VFS operations for file I/O.
Diffstat (limited to 'source/locking')
-rw-r--r-- | source/locking/locking.c | 9 | ||||
-rw-r--r-- | source/locking/locking_slow.c | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c index 84c9c442b5a..fdc39d00407 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -87,7 +87,8 @@ BOOL is_locked(files_struct *fsp,connection_struct *conn, * fd. So we don't need to use map_lock_type here. */ - return(fcntl_lock(fsp->fd_ptr->fd,SMB_F_GETLK,offset,count,lock_type)); + return(conn->vfs_ops.lock(fsp->fd_ptr->fd,SMB_F_GETLK,offset,count, + lock_type)); } @@ -113,8 +114,8 @@ BOOL do_lock(files_struct *fsp,connection_struct *conn, lock_type, (double)offset, (double)count, fsp->fsp_name )); if (OPEN_FSP(fsp) && fsp->can_lock && (fsp->conn == conn)) - ok = fcntl_lock(fsp->fd_ptr->fd,SMB_F_SETLK,offset,count, - map_lock_type(fsp,lock_type)); + ok = conn->vfs_ops.lock(fsp->fd_ptr->fd,SMB_F_SETLK,offset,count, + map_lock_type(fsp,lock_type)); if (!ok) { *eclass = ERRDOS; @@ -140,7 +141,7 @@ BOOL do_unlock(files_struct *fsp,connection_struct *conn, (double)offset, (double)count, fsp->fsp_name )); if (OPEN_FSP(fsp) && fsp->can_lock && (fsp->conn == conn)) - ok = fcntl_lock(fsp->fd_ptr->fd,SMB_F_SETLK,offset,count,F_UNLCK); + ok = conn->vfs_ops.lock(fsp->fd_ptr->fd,SMB_F_SETLK,offset,count,F_UNLCK); if (!ok) { *eclass = ERRDOS; diff --git a/source/locking/locking_slow.c b/source/locking/locking_slow.c index a4653634677..64bedca4ad2 100644 --- a/source/locking/locking_slow.c +++ b/source/locking/locking_slow.c @@ -177,7 +177,7 @@ static BOOL slow_lock_share_entry(connection_struct *conn, /* At this point we have an open fd to the share mode file. Lock the first byte exclusively to signify a lock. */ - if(fcntl_lock(fd, SMB_F_SETLKW, 0, 1, F_WRLCK) == False) + if(conn->vfs_ops.lock(fd, SMB_F_SETLKW, 0, 1, F_WRLCK) == False) { DEBUG(0,("ERROR lock_share_entry: fcntl_lock on file %s failed with %s\n", fname, strerror(errno))); @@ -254,7 +254,7 @@ static BOOL slow_unlock_share_entry(connection_struct *conn, /* token is the fd of the open share mode file. */ /* Unlock the first byte. */ - if(fcntl_lock(fd, SMB_F_SETLKW, 0, 1, F_UNLCK) == False) + if(conn->vfs_ops.lock(fd, SMB_F_SETLKW, 0, 1, F_UNLCK) == False) { DEBUG(0,("ERROR unlock_share_entry: fcntl_lock failed with %s\n", strerror(errno))); @@ -692,7 +692,7 @@ static BOOL slow_set_share_mode(int token,files_struct *fsp, uint16 port, uint16 share_name(fsp->conn, fsp->fd_ptr->dev, fsp->fd_ptr->inode, fname); - if(sys_fstat(fd, &sb) != 0) + if(fsp->conn->vfs_ops.fstat_file(fd, &sb) != 0) { DEBUG(0,("ERROR: set_share_mode: Failed to do stat on share file %s\n", fname)); |