[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1266863982-5258-8-git-send-email-maximlevitsky@gmail.com>
Date: Mon, 22 Feb 2010 20:39:34 +0200
From: Maxim Levitsky <maximlevitsky@...il.com>
To: David Woodhouse <dwmw2@...radead.org>
Cc: linux-mtd <linux-mtd@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Alex Dubov <oakad@...oo.com>, joern <joern@...fs.org>,
Thomas Gleixner <tglx@...utronix.de>,
<stanley.miao@...driver.com>, Vitaly Wool <vitalywool@...il.com>,
Maxim Levitsky <maximlevitsky@...il.com>
Subject: [PATCH 07/15] MTD: nand: make suspend work if device is accessed by kernel threads.
Since all userspace threads are frozen at the time the nand_suspend is called,
they aren't inside any nand function.
We don't call try_to_freeze in nand ether. Thus the only user that can be inside
the nand functions is an non freezeable kernel thread.
Thus we can safely wait for it to finish.
Signed-off-by: Maxim Levitsky <maximlevitsky@...il.com>
---
drivers/mtd/nand/nand_base.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index ed62e1e..7442b3a 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -773,9 +773,6 @@ nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state)
chip->state = FL_PM_SUSPENDED;
spin_unlock(lock);
return 0;
- } else {
- spin_unlock(lock);
- return -EAGAIN;
}
}
set_current_state(TASK_UNINTERRUPTIBLE);
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists