summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/vfs_posix.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-18 10:38:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:58:41 -0500
commit75140d6150264ba50a47e104c3ce1ae40bd3f0c8 (patch)
tree1345a43aeaaa6847a765ab69cb484a4dd7403d10 /source4/ntvfs/posix/vfs_posix.h
parent9225c02aee19478fc4825c4b798a6757d140b5c0 (diff)
downloadsamba-75140d6150264ba50a47e104c3ce1ae40bd3f0c8.tar.gz
samba-75140d6150264ba50a47e104c3ce1ae40bd3f0c8.tar.bz2
samba-75140d6150264ba50a47e104c3ce1ae40bd3f0c8.zip
r14540: fix a talloc hierachie problem,
make sure file and search handles are cleaned up before anything else in the pvfs_state struct, as there destructors reply on a valid pvfs_state struct metze (This used to be commit aaa5d377b9b6145a83c0e686c7fbb7b561ae8988)
Diffstat (limited to 'source4/ntvfs/posix/vfs_posix.h')
-rw-r--r--source4/ntvfs/posix/vfs_posix.h44
1 files changed, 33 insertions, 11 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index f75e7d3563..59e4ec1abf 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -38,20 +38,12 @@ struct pvfs_state {
const char *share_name;
uint_t flags;
- struct pvfs_file *open_files;
-
struct pvfs_mangle_context *mangle_ctx;
struct brl_context *brl_context;
struct odb_context *odb_context;
struct sidmap_context *sidmap;
- /* an id tree mapping open search ID to a pvfs_search_state structure */
- struct idr_context *idtree_search;
-
- /* an id tree mapping open file handle -> struct pvfs_file */
- struct idr_context *idtree_fnum;
-
/* a list of pending async requests. Needed to support
ntcancel */
struct pvfs_wait *wait_list;
@@ -68,9 +60,25 @@ struct pvfs_state {
/* the allocation size rounding */
uint32_t alloc_size_rounding;
- /* how long to keep inactive searches around for */
- uint_t search_inactivity_time;
-
+ struct {
+ /* an id tree mapping open file handle -> struct pvfs_file */
+ struct idr_context *idtree;
+
+ /* the open files as DLINKLIST */
+ struct pvfs_file *list;
+ } files;
+
+ struct {
+ /* an id tree mapping open search ID to a pvfs_search_state structure */
+ struct idr_context *idtree;
+
+ /* the open searches as DLINKLIST */
+ struct pvfs_search_state *list;
+
+ /* how long to keep inactive searches around for */
+ uint_t inactivity_time;
+ } search;
+
/* used to accelerate acl mapping */
struct {
const struct dom_sid *creator_owner;
@@ -173,6 +181,20 @@ struct pvfs_file {
uint64_t lock_count;
};
+/* the state of a search started with pvfs_search_first() */
+struct pvfs_search_state {
+ struct pvfs_search_state *prev, *next;
+ struct pvfs_state *pvfs;
+ uint16_t handle;
+ uint_t current_index;
+ uint16_t search_attrib;
+ uint16_t must_attrib;
+ struct pvfs_dir *dir;
+ time_t last_used;
+ uint_t num_ea_names;
+ struct ea_name *ea_names;
+ struct timed_event *te;
+};
/* flags to pvfs_resolve_name() */
#define PVFS_RESOLVE_WILDCARD (1<<0)