From: Steven Whitehouse Date: Mon, 23 Jun 2014 13:43:32 +0000 (+0100) Subject: GFS2: Fix race in glock lru glock disposal X-Git-Tag: omap-for-v3.17/fixes-against-rc2~276^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94a09a3999ee978e097b5aad74034ed43bae56db;p=pandora-kernel.git GFS2: Fix race in glock lru glock disposal We must not leave items on the LRU list with GLF_LOCK set, since they can be removed if the glock is brought back into use, which may then potentially result in a hang, waiting for GLF_LOCK to clear. It doesn't happen very often, since it requires a glock that has not been used for a long time to be brought back into use at the same moment that the shrinker is part way through disposing of glocks. The fix is to set GLF_LOCK at a later time, when we already know that the other locks can be obtained. Also, we now only release the lru_lock in case a resched is needed, rather than on every iteration. Signed-off-by: Steven Whitehouse --- Reading git-diff-tree failed