files_struct *fsp, size_t ext_size,
void (*destroy_fn)(void *p_data));
void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
+void vfs_remove_all_fsp_extensions(struct files_struct *fsp);
void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
bool smbd_vfs_init(connection_struct *conn);
}
}
+void vfs_remove_all_fsp_extensions(files_struct *fsp)
+{
+ struct vfs_fsp_data *curr;
+ struct vfs_fsp_data *prev;
+
+ for (curr = fsp->vfs_extension, prev = NULL;
+ curr;
+ prev = curr, curr = curr->next)
+ {
+ if (prev) {
+ prev->next = curr->next;
+ } else {
+ fsp->vfs_extension = curr->next;
+ }
+ if (curr->destroy) {
+ curr->destroy(EXT_DATA_AREA(curr));
+ }
+ TALLOC_FREE(curr);
+ }
+}
+
void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp)
{
struct vfs_fsp_data *head;