mtd: change struct flchip_shared spinlock locking into mutex

This patch prevent to schedule while atomic by changing the
flchip_shared spinlock into a mutex. This should be save since no atomic
path will use this lock.

It was suggested by Arnd Bergmann and Vasiliy Kulikov.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Stefani Seibold 2010-08-05 09:19:26 +02:00 committed by David Woodhouse
parent b8664b3762
commit 8ae664184c
3 changed files with 21 additions and 21 deletions

View file

@ -92,7 +92,7 @@ struct flchip {
/* This is used to handle contention on write/erase operations
between partitions of the same physical chip. */
struct flchip_shared {
spinlock_t lock;
struct mutex lock;
struct flchip *writing;
struct flchip *erasing;
};