summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-11 13:28:28 +0100
committerMichael Adam <obnox@samba.org>2008-04-21 00:21:24 +0200
commit2f8dde9ec8110557c23df6ea66913a7d39425415 (patch)
treefd8df180eb0b0051c34fef2fd5c0616bc040ea38 /source3/locking
parent96e9e83ee021db69179fe924144e6ba3dea1b73d (diff)
downloadsamba-2f8dde9ec8110557c23df6ea66913a7d39425415.tar.gz
samba-2f8dde9ec8110557c23df6ea66913a7d39425415.tar.bz2
samba-2f8dde9ec8110557c23df6ea66913a7d39425415.zip
Change fd_close_posix() to return int instead of NTSTATUS.
The errno is handed up through the VFS layer to the callers. Michael (This used to be commit d928e6648d61cf2d3c1b77db440efb835b729a84)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/posix.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 844a86e863..aedc12dede 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -607,7 +607,7 @@ static size_t get_posix_pending_close_entries(TALLOC_CTX *mem_ctx,
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;
@@ -620,11 +620,7 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
* 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)) {
@@ -635,7 +631,7 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
*/
add_fd_to_close_entry(fsp);
- return NT_STATUS_OK;
+ return 0;
}
/*
@@ -678,11 +674,7 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
ret = -1;
}
- if (ret == -1) {
- return map_nt_error_from_unix(errno);
- }
-
- return NT_STATUS_OK;
+ return ret;
}
/****************************************************************************