Remove unneeded stat call.
authorJeremy Allison <jra@samba.org>
Wed, 9 Feb 2011 00:51:17 +0000 (16:51 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 9 Feb 2011 18:29:50 +0000 (10:29 -0800)
source3/smbd/open.c

index a9a12eaa0b233c6c478cd30100a3b9089f3ebd6a..2379b8ebb2efb243978d82b1bd9f8e16a566aa50 100644 (file)
@@ -2591,16 +2591,11 @@ static NTSTATUS open_directory(connection_struct *conn,
        switch( create_disposition ) {
                case FILE_OPEN:
 
-                       info = FILE_WAS_OPENED;
-
-                       /*
-                        * We want to follow symlinks here.
-                        */
-
-                       if (SMB_VFS_STAT(conn, smb_dname) != 0) {
-                               return map_nt_error_from_unix(errno);
+                       if (!dir_existed) {
+                               return NT_STATUS_OBJECT_NAME_NOT_FOUND;
                        }
-                               
+
+                       info = FILE_WAS_OPENED;
                        break;
 
                case FILE_CREATE: