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
(This used to be commit 83e6c99f78990b6b1df520bdee14b9f931ad0420)

source4/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)) {