summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_unlink.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-02-28 03:47:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:08 -0500
commit40a8d58551526a0f367d23d0c9603a5b9d86b270 (patch)
treeecc25f71a1ae366b757e711c8f69bd206903092e /source4/ntvfs/posix/pvfs_unlink.c
parente3e048630be2fbf20d580850e5673ad372bd34f0 (diff)
downloadsamba-40a8d58551526a0f367d23d0c9603a5b9d86b270.tar.gz
samba-40a8d58551526a0f367d23d0c9603a5b9d86b270.tar.bz2
samba-40a8d58551526a0f367d23d0c9603a5b9d86b270.zip
r13739: a fairly major overhaul of the opendb code to allow the BASE-DELETE
test to pass. To try to make the code a bit more understandable, I moved to using an IDL description of the opendb tdb record format. One of the larger changes was to make directory opens and creates go via the opendb code, so directory operations now obey all the share mode restrictions, as well as delete on close semantics. I also changed the period over which the opendb locks are held, to try to minimise races due to two open operations happening at the same time. (This used to be commit cd2602d05725e1734b0862131dd91601c6b6d51a)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_unlink.c')
-rw-r--r--source4/ntvfs/posix/pvfs_unlink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_unlink.c b/source4/ntvfs/posix/pvfs_unlink.c
index 5f8a828f15..8eea2c47b8 100644
--- a/source4/ntvfs/posix/pvfs_unlink.c
+++ b/source4/ntvfs/posix/pvfs_unlink.c
@@ -33,6 +33,7 @@ static NTSTATUS pvfs_unlink_stream(struct pvfs_state *pvfs,
uint16_t attrib)
{
NTSTATUS status;
+ struct odb_lock *lck;
if (!name->stream_exists) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
@@ -44,7 +45,7 @@ static NTSTATUS pvfs_unlink_stream(struct pvfs_state *pvfs,
return status;
}
- status = pvfs_can_delete(pvfs, req, name);
+ status = pvfs_can_delete(pvfs, req, name, &lck);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -63,6 +64,7 @@ static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs,
{
struct pvfs_filename *name;
NTSTATUS status;
+ struct odb_lock *lck;
/* get a pvfs_filename object */
status = pvfs_resolve_partial(pvfs, req,
@@ -78,7 +80,7 @@ static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs,
return status;
}
- status = pvfs_can_delete(pvfs, req, name);
+ status = pvfs_can_delete(pvfs, req, name, &lck);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(name);
return status;