Change locking to allow reentry during readdir
[yaffs2.git] / yaffs_guts.h
index f47c65edda47f8362c2569b4de74e8a7782438da..abcb74fa13534995fcb09b9bfdc4055a433186e2 100644 (file)
@@ -640,6 +640,7 @@ struct yaffs_DeviceStruct {
 
        struct semaphore sem;   /* Semaphore for waiting on erasure.*/
        struct semaphore grossLock;     /* Gross locking semaphore */
+       struct rw_semaphore dirLock; /* Lock the directory structure */
        __u8 *spareBuffer;      /* For mtdif2 use. Don't know the size of the buffer
                                 * at compile time so we have to allocate it.
                                 */