summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-11 12:18:33 +0100
committerMichael Adam <obnox@samba.org>2008-04-21 00:21:23 +0200
commit3756467db6a661be91f4aeb484000e993e4a9a4c (patch)
tree11c9030a4b2bd83a9716529e9bffa8e7f9900592 /source3/modules
parent00210d773b64578992ed936290cc7ab9a6d4d187 (diff)
downloadsamba-3756467db6a661be91f4aeb484000e993e4a9a4c.tar.gz
samba-3756467db6a661be91f4aeb484000e993e4a9a4c.tar.bz2
samba-3756467db6a661be91f4aeb484000e993e4a9a4c.zip
Move the posix pending close functionality down into the VFS layer.
This hides the pending close fds from the outside. Call order of SMB_VFS_CLOSE is reversed. Originally, it was: fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close And now it is: fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close This is in preparation of removing the fd parameter from the SMB_VFS_CLOSE function. But it is also the right place for the pending close calls anyways. Michael (This used to be commit 3cf56b124a2886c6260455bba4bf77d08e9a4f77)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 31ebb6352a..9887b309f9 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -210,13 +210,13 @@ static int vfswrap_open(vfs_handle_struct *handle, const char *fname,
static int vfswrap_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
{
- int result;
+ NTSTATUS result;
START_PROFILE(syscall_close);
-
- result = close(fd);
+ result = fd_close_posix(fsp);
END_PROFILE(syscall_close);
- return result;
+
+ return NT_STATUS_IS_OK(result) ? 0 : -1;
}
static ssize_t vfswrap_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)