mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.148,1.149

Nicolas Pitre nico at infradead.org
Fri Jun 11 17:36:06 EDT 2004


Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv4385/drivers/mtd/chips

Modified Files:
	cfi_cmdset_0001.c 
Log Message:
More partition locking fixes.


Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -r1.148 -r1.149
--- cfi_cmdset_0001.c	11 Jun 2004 21:27:47 -0000	1.148
+++ cfi_cmdset_0001.c	11 Jun 2004 21:36:03 -0000	1.149
@@ -584,8 +584,16 @@
 				struct flchip *loaner = shared->writing;
 				spin_lock(loaner->mutex);
 				spin_unlock(&shared->lock);
+				spin_unlock(chip->mutex);
 				put_chip(map, loaner, loaner->start);
+				spin_lock(chip->mutex);
+				spin_unlock(loaner->mutex);
 			} else {
+				if (chip->oldstate != FL_ERASING) {
+					shared->erasing = NULL;
+					if (chip->oldstate != FL_WRITING)
+						shared->writing = NULL;
+				}
 				spin_unlock(&shared->lock);
 			}
 		}





More information about the linux-mtd-cvs mailing list