to delete all locks on this fsp before this function is called.
****************************************************************************/
-NTSTATUS fd_close_posix(struct files_struct *fsp)
+int fd_close_posix(struct files_struct *fsp)
{
int saved_errno = 0;
int ret;
* which will lose all locks on all fd's open on this dev/inode,
* just close.
*/
- ret = close(fsp->fh->fd);
- if (ret == -1) {
- return map_nt_error_from_unix(errno);
- }
- return NT_STATUS_OK;
+ return close(fsp->fh->fd);
}
if (get_windows_lock_ref_count(fsp)) {
*/
add_fd_to_close_entry(fsp);
- return NT_STATUS_OK;
+ return 0;
}
/*
ret = -1;
}
- if (ret == -1) {
- return map_nt_error_from_unix(errno);
- }
-
- return NT_STATUS_OK;
+ return ret;
}
/****************************************************************************
static int vfswrap_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
{
- NTSTATUS result;
+ int result;
START_PROFILE(syscall_close);
result = fd_close_posix(fsp);
END_PROFILE(syscall_close);
-
- return NT_STATUS_IS_OK(result) ? 0 : -1;
+ return result;
}
static ssize_t vfswrap_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)