diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-04-10 13:05:23 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-04-10 13:05:23 +0000 |
commit | 689ec46450a3f373b583ebe98d124ab4a99ce3ef (patch) | |
tree | 2e86c1a862fce2da5162de7a3cd45fc8611d5a38 /source3/smbd/close.c | |
parent | c3043695ae507b34580dc1287418ff5704b6f625 (diff) | |
download | samba-689ec46450a3f373b583ebe98d124ab4a99ce3ef.tar.gz samba-689ec46450a3f373b583ebe98d124ab4a99ce3ef.tar.xz samba-689ec46450a3f373b583ebe98d124ab4a99ce3ef.zip |
the bulk of the changes to get rid of fd_ptr and move print open
handling to printing/printing.c
most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd
the changes in open.c are quite dramatic. Most of it is removing all
the functions that handled the fd multiplexing
(This used to be commit d1827a3648009fd0a0d165055015d9aeda7a1037)
Diffstat (limited to 'source3/smbd/close.c')
-rw-r--r-- | source3/smbd/close.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 8e2ed0de0e..61e8264159 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -92,10 +92,7 @@ static void close_filestruct(files_struct *fsp) static int close_normal_file(files_struct *fsp, BOOL normal_close) { - SMB_DEV_T dev = fsp->fd_ptr->dev; - SMB_INO_T inode = fsp->fd_ptr->inode; - BOOL last_reference = False; - BOOL delete_on_close = fsp->fd_ptr->delete_on_close; + BOOL delete_on_close = fsp->delete_on_close; connection_struct *conn = fsp->conn; int err = 0; @@ -103,12 +100,8 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) close_filestruct(fsp); -#if USE_READ_PREDICTION - invalidate_read_prediction(fsp->fd_ptr->fd); -#endif - if (lp_share_modes(SNUM(conn))) { - lock_share_entry(conn, dev, inode); + lock_share_entry_fsp(fsp); del_share_mode(fsp); } @@ -117,13 +110,10 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) locking_close_file(fsp); - if(fd_attempt_close(fsp, &err) == 0) - last_reference = True; - - fsp->fd_ptr = NULL; - if (lp_share_modes(SNUM(conn))) - unlock_share_entry(conn, dev, inode); + unlock_share_entry_fsp(fsp); + + fd_close(fsp, &err); /* NT uses smbclose to start a print - weird */ if (normal_close && fsp->print_file) @@ -139,7 +129,7 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) * reference to a file. */ - if (normal_close && last_reference && delete_on_close) { + if (normal_close && delete_on_close) { DEBUG(5,("close_file: file %s. Delete on close was set - deleting file.\n", fsp->fsp_name)); if(fsp->conn->vfs_ops.unlink(dos_to_unix(fsp->fsp_name, False)) != 0) { |