[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-32-41-g3d10c23

Jeremy Allison jra at samba.org
Sat Sep 27 01:42:12 GMT 2008


The branch, v3-0-test has been updated
       via  3d10c237a9b71d269d7936d58c2f8c0172165cbe (commit)
      from  2f230176a19788e659522c7ccccb19b289412166 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit 3d10c237a9b71d269d7936d58c2f8c0172165cbe
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 26 18:41:05 2008 -0700

    Fix for bug #5790 - samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file disposition call.
    This was my fault. I use a singleton cache (positive and negative) to speed up pathname based
    qfileinfo/setfileinfo lookups for alternate fsp's open on the same path. I only invalidated the
    negative cache on adding a new file fsp, as I incorrectly imagined the new fsp was put at the *end* of
    the open files list. DLIST_ADD puts it at the start, meaning any subsequent open wasn't seen once the
    cache was set. Doh !
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/files.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/files.c b/source/smbd/files.c
index 9f3f72a..30de12b 100644
--- a/source/smbd/files.c
+++ b/source/smbd/files.c
@@ -124,10 +124,12 @@ NTSTATUS file_new(connection_struct *conn, files_struct **result)
 
 	chain_fsp = fsp;
 
-	/* A new fsp invalidates a negative fsp_fi_cache. */
-	if (fsp_fi_cache.fsp == NULL) {
-		ZERO_STRUCT(fsp_fi_cache);
-	}
+	/* A new fsp invalidates the positive and
+	   negative fsp_fi_cache as the new fsp is pushed
+	   at the start of the list and we search from
+	   a cache hit to the *end* of the list. */
+
+	ZERO_STRUCT(fsp_fi_cache);
 
 	*result = fsp;
 	return NT_STATUS_OK;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list