pvfs_unlink: move !name->stream_exists into the caller
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Feb 2008 08:28:51 +0000 (09:28 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 25 Feb 2008 07:03:41 +0000 (08:03 +0100)
metze

source/ntvfs/posix/pvfs_unlink.c

index 8dbf9ee7242a4a09430b053c308f28750d170464..2b96a5032c9f4f12a3c83d9001a2c27f1ba48848 100644 (file)
@@ -34,10 +34,6 @@ static NTSTATUS pvfs_unlink_stream(struct pvfs_state *pvfs,
 {
        NTSTATUS status;
 
-       if (!name->stream_exists) {
-               return NT_STATUS_OBJECT_NAME_NOT_FOUND;
-       }
-
        /* make sure its matches the given attributes */
        status = pvfs_match_attrib(pvfs, name,
                                   unl->unlink.in.attrib, 0);
@@ -135,6 +131,10 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
        }
 
        if (name->stream_name) {
+               if (!name->stream_exists) {
+                       return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+               }
+
                return pvfs_unlink_stream(pvfs, req, unl, name);
        }