From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: JFFS2 deadlock with alloc_sem From: David Woodhouse To: Dave Kleikamp In-Reply-To: <1185557896.22352.4.camel@kleikamp.austin.ibm.com> References: <1185543729.13873.10.camel@kleikamp.austin.ibm.com> <1185557896.22352.4.camel@kleikamp.austin.ibm.com> Content-Type: text/plain Date: Mon, 30 Jul 2007 13:45:08 +0100 Message-Id: <1185799508.3083.20.camel@pmac.infradead.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: linux-mtd@lists.infradead.org, ye janboe List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2007-07-27 at 12:38 -0500, Dave Kleikamp wrote: > I could only speculate, since I really don't know the code. I suspect > the writer of the comment had some other deadlock scenario in mind and > didn't foresee the one that was encountered. I'm still confused because we deliberately ensure the page is up to date in prepare_write -- so read_cache_page() should never have to lock it, and we should never deadlock. Or did I miss something in your analysis (or elsewhere)? Why is read_cache_page() ever trying to lock this page in the first place? It should be up to date. -- dwmw2