Move INTERNAL_OPEN_ONLY calculation out of the way
authorVolker Lendecke <vl@samba.org>
Tue, 11 Dec 2007 09:36:59 +0000 (10:36 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 11 Dec 2007 15:16:54 +0000 (16:16 +0100)
source/smbd/open.c

index 0e73ba964e02fa32266dc05476849f890c9a46c8..47985637214fd3378385acc812130e27df8ea435 100644 (file)
@@ -2611,10 +2611,6 @@ NTSTATUS create_file(connection_struct *conn,
                }
        }
 
-       if (req == NULL) {
-               oplock_request |= INTERNAL_OPEN_ONLY;
-       }
-
        if ((req != NULL) && (req->flags2 & FLAGS2_DFS_PATHNAMES)) {
                char *resolved_fname;
 
@@ -2660,6 +2656,10 @@ NTSTATUS create_file(connection_struct *conn,
                goto fail;
        }
 
+       if (req == NULL) {
+               oplock_request |= INTERNAL_OPEN_ONLY;
+       }
+
        /* This is the correct thing to do (check every time) but can_delete
         * is expensive (it may have to read the parent directory
         * permissions). So for now we're not doing it unless we have a strong