pvfs_open: pass down open_disposition and break_to_none to odb_open_file()
authorStefan Metzmacher <metze@samba.org>
Mon, 25 Feb 2008 15:49:40 +0000 (16:49 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 26 Feb 2008 08:32:55 +0000 (09:32 +0100)
metze

source/ntvfs/posix/pvfs_open.c

index 3a8b17ab16ddb371a50688d3a29618c024cda4d7..1b5ea56d64f2747b18cf02142f8abb745ee328ae 100644 (file)
@@ -296,9 +296,10 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
                }
                
                /* see if we are allowed to open at the same time as existing opens */
-               status = odb_open_file(lck, f->handle, f->handle->name->stream_id,
+               status = odb_open_file(lck, f->handle, name->full_name, name->stream_id,
                                       share_access, access_mask, del_on_close, 
-                                      name->full_name, OPLOCK_NONE, NULL);
+                                      io->generic.in.open_disposition,
+                                      false, OPLOCK_NONE, NULL);
 
                if (!NT_STATUS_IS_OK(status)) {
                        talloc_free(lck);
@@ -349,9 +350,10 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
                        return NT_STATUS_INTERNAL_DB_CORRUPTION;
                }
 
-               status = odb_open_file(lck, f->handle, f->handle->name->stream_id,
+               status = odb_open_file(lck, f->handle, name->full_name, name->stream_id,
                                       share_access, access_mask, del_on_close, 
-                                      name->full_name, OPLOCK_NONE, NULL);
+                                      io->generic.in.open_disposition,
+                                      false, OPLOCK_NONE, NULL);
 
                if (!NT_STATUS_IS_OK(status)) {
                        goto cleanup_delete;
@@ -669,9 +671,10 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
                oplock_level = OPLOCK_EXCLUSIVE;
        }
 
-       status = odb_open_file(lck, f->handle, name->stream_id,
+       status = odb_open_file(lck, f->handle, name->full_name, name->stream_id,
                               share_access, access_mask, del_on_close, 
-                              name->full_name, oplock_level, &oplock_granted);
+                              io->generic.in.open_disposition,
+                              false, oplock_level, &oplock_granted);
        talloc_free(lck);
        if (!NT_STATUS_IS_OK(status)) {
                /* bad news, we must have hit a race - we don't delete the file
@@ -1186,9 +1189,10 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
        }
 
        /* see if we are allowed to open at the same time as existing opens */
-       status = odb_open_file(lck, f->handle, f->handle->name->stream_id,
+       status = odb_open_file(lck, f->handle, name->full_name, name->stream_id,
                               share_access, access_mask, del_on_close,
-                              name->full_name, oplock_level, &oplock_granted);
+                              io->generic.in.open_disposition,
+                              false, oplock_level, &oplock_granted);
 
        /* on a sharing violation we need to retry when the file is closed by 
           the other user, or after 1 second */