1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

vfs_streams_xattr: make use of vfs_fake_fd_close()

When we used vfs_fake_fd() we should use vfs_fake_fd_close()
in order to have things symetric.

That may allows us to change vfs_fake_fd() internally if required.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2020-12-18 14:36:00 +01:00 committed by Jeremy Allison
parent 719c83b4dc
commit 40e70cbd3c

View File

@ -488,7 +488,7 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle,
fail:
if (fakefd >= 0) {
close(fakefd);
vfs_fake_fd_close(fakefd);
fakefd = -1;
}
@ -510,7 +510,7 @@ static int streams_xattr_close(vfs_handle_struct *handle,
return SMB_VFS_NEXT_CLOSE(handle, fsp);
}
ret = close(fd);
ret = vfs_fake_fd_close(fd);
fsp_set_fd(fsp, -1);
return ret;