From: Artem Bityutskiy Date: Sat, 23 May 2009 10:44:09 +0000 (+0300) Subject: UBI: fix race condition X-Git-Tag: v2.6.31-rc1~286^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddbd3b61708483f73dbcc62a94d16cc7db928cba;p=pandora-kernel.git UBI: fix race condition This patch fixes a minor problem where we may fail to wake upe the UBI background thread. This is not fatal at all, it may just result at sligtly worse performace for a short period of time, just because the thread will be woken up when real I/O on the UBI starts. Anywey, the issue is the race condition between 'ubi_attach_mtd_dev()' and 'ubi_thread()'. If we do not serialize them, the 'wake_up_process()' call may be done before 'ubi_thread()' went seep, but after it checked 'ubi->thread_enabled'. This issue was spotted by Shin Hong Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed