summaryrefslogtreecommitdiff
path: root/source3/locking
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/locking
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/locking')
-rw-r--r--source3/locking/posix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 1b88c472b0..f42d1ec6f8 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -620,7 +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 = SMB_VFS_CLOSE(fsp,fsp->fh->fd);
+ ret = close(fsp->fh->fd);
fsp->fh->fd = -1;
if (ret == -1) {
return map_nt_error_from_unix(errno);
@@ -651,7 +651,7 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
DEBUG(10,("fd_close_posix: doing close on %u fd's.\n", (unsigned int)count ));
for(i = 0; i < count; i++) {
- if (SMB_VFS_CLOSE(fsp,fd_array[i]) == -1) {
+ if (close(fd_array[i]) == -1) {
saved_errno = errno;
}
}
@@ -673,7 +673,7 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
* Finally close the fd associated with this fsp.
*/
- ret = SMB_VFS_CLOSE(fsp,fsp->fh->fd);
+ ret = close(fsp->fh->fd);
if (ret == 0 && saved_errno != 0) {
errno = saved_errno;