Assert this is the case.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Dec 18 16:27:38 UTC 2020 on sn-devel-184
NTSTATUS status;
struct files_struct *base_fsp = fsp->base_fsp;
- if (fsp->fsp_flags.is_dirfsp) {
- /*
- * The typical way to get here is via file_close_[conn|user]()
- * and this is taken care of below.
- */
- return NT_STATUS_OK;
- }
+ /*
+ * This fsp can never be an internal dirfsp. They must
+ * be explicitly closed by TALLOC_FREE of the dir handle.
+ */
+ SMB_ASSERT(!fsp->fsp_flags.is_dirfsp);
if (fsp->fsp_flags.is_directory) {
status = close_directory(req, fsp, close_type);