summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common/opendb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-22 07:01:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:25 -0500
commit020b38656016d3adeeaa9b09d41ea0c29f686ed4 (patch)
treea652a2e5e3989019efa79cfd4bdf1574594e1ec6 /source4/ntvfs/common/opendb.c
parent7d30e54927e75cc38520005d5f713dfd5dd1a8b1 (diff)
downloadsamba-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/opendb.c')
-rw-r--r--source4/ntvfs/common/opendb.c5
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;
}