diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-22 07:01:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:02:25 -0500 |
commit | 020b38656016d3adeeaa9b09d41ea0c29f686ed4 (patch) | |
tree | a652a2e5e3989019efa79cfd4bdf1574594e1ec6 /source4/ntvfs/common | |
parent | 7d30e54927e75cc38520005d5f713dfd5dd1a8b1 (diff) | |
download | samba-020b38656016d3adeeaa9b09d41ea0c29f686ed4.tar.gz samba-020b38656016d3adeeaa9b09d41ea0c29f686ed4.tar.bz2 samba-020b38656016d3adeeaa9b09d41ea0c29f686ed4.zip |
r3135: split the "create new" logic out from the "open existing" logic in
pvfs_open, and handle the various race conditions that are inherent in
cifs on unix, so we do the best we can when the race happens.
the ntcreatex code is really starting to take shape now
(This used to be commit 395c3815b468ae55de9a1135e478711f0e7d8cfc)
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r-- | source4/ntvfs/common/opendb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c index 63d3eacf8e..3b80145414 100644 --- a/source4/ntvfs/common/opendb.c +++ b/source4/ntvfs/common/opendb.c @@ -117,11 +117,12 @@ static int odb_lock_destructor(void *ptr) get a lock on a entry in the odb. This call returns a lock handle, which the caller should unlock using talloc_free(). */ -struct odb_lock *odb_lock(struct odb_context *odb, DATA_BLOB *file_key) +struct odb_lock *odb_lock(TALLOC_CTX *mem_ctx, + struct odb_context *odb, DATA_BLOB *file_key) { struct odb_lock *lck; - lck = talloc_p(odb, struct odb_lock); + lck = talloc_p(mem_ctx, struct odb_lock); if (lck == NULL) { return NULL; } |