summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_default.c')
-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)