pvfs_unlink: add a fast path for the non wildcard case
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Feb 2008 08:30:51 +0000 (09:30 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 25 Feb 2008 07:03:42 +0000 (08:03 +0100)
metze

source/ntvfs/posix/pvfs_unlink.c

index 2b96a5032c9f4f12a3c83d9001a2c27f1ba48848..72649e646d2a317547d39b08686871772c3154b9 100644 (file)
@@ -138,6 +138,10 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
                return pvfs_unlink_stream(pvfs, req, unl, name);
        }
 
+       if (!name->has_wildcard) {
+               return pvfs_unlink_one(pvfs, req, unl, name);
+       }
+
        /* get list of matching files */
        status = pvfs_list_start(pvfs, name, req, &dir);
        if (!NT_STATUS_IS_OK(status)) {