From: Michel Lespinasse Date: Tue, 7 May 2013 13:45:50 +0000 (-0700) Subject: rwsem: shorter spinlocked section in rwsem_down_failed_common() X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~14^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7dd1cee9a4e2b1450e4a3732636dfbf28562ee4;p=pandora-kernel.git rwsem: shorter spinlocked section in rwsem_down_failed_common() This change reduces the size of the spinlocked and TASK_UNINTERRUPTIBLE sections in rwsem_down_failed_common(): - We only need the sem->wait_lock to insert ourselves on the wait_list; the waiter node can be prepared outside of the wait_lock. - The task state only needs to be set to TASK_UNINTERRUPTIBLE immediately before checking if we actually need to sleep; it doesn't need to protect the entire function. Signed-off-by: Michel Lespinasse Reviewed-by: Rik van Riel Reviewed-by: Peter Hurley Acked-by: Davidlohr Bueso Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed