From: David Woodhouse Date: Wed, 19 May 2010 15:37:13 +0000 (+0100) Subject: jffs2: Erase pending blocks in GC pass, avoid invalid -EIO return X-Git-Tag: v2.6.35-rc1~465^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0717bf8411bb673dd2369aaa096f7396446b38f5;p=pandora-kernel.git jffs2: Erase pending blocks in GC pass, avoid invalid -EIO return jffs2_garbage_collect_pass() would previously return -EAGAIN if it couldn't find anything to garbage collect from, and there were blocks on the erase_pending_list. If the blocks were actually in the process of being erased, though, then they wouldn't be on that list. Check for nr_erasing_blocks being non-zero instead. Fix jffs2_reserve_space() to wait for the in-progress erases to complete, when jffs2_garbage_collect_pass() returns -EAGAIN. And fix jffs2_erase_succeeded() to actually wake up the erase_wait wq that jffs2_reserve_space() is now using. Signed-off-by: David Woodhouse --- Reading git-diff-tree failed