yaffs direct: Fix bug where handle reinitialisation was damaging dsc lists
authorCharles Manning <cdhmanning@gmail.com>
Wed, 24 Oct 2012 19:57:27 +0000 (08:57 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Wed, 24 Oct 2012 19:57:27 +0000 (08:57 +1300)
This was a pretty obscure bug that only shows up if mounting a second mount
point while a directory search context was in use (ie a directory open for reading).

Thanks to Ed for finding this.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/yaffsfs.c

index 7ee486a..a269984 100644 (file)
@@ -122,6 +122,8 @@ static void yaffsfs_InitHandles(void)
        if (yaffsfs_handlesInitialised)
                return;
 
+       yaffsfs_handlesInitialised = 1;
+
        memset(yaffsfs_inode, 0, sizeof(yaffsfs_inode));
        memset(yaffsfs_fd, 0, sizeof(yaffsfs_fd));
        memset(yaffsfs_handle, 0, sizeof(yaffsfs_handle));