From: Linus Torvalds Date: Wed, 27 Oct 2010 16:38:12 +0000 (-0400) Subject: fasync: re-organize fasync entry insertion to allow it under a spinlock X-Git-Tag: v2.6.37-rc1~90^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7347ce4ee7c65415f84be915c018473e7076f31;p=pandora-kernel.git fasync: re-organize fasync entry insertion to allow it under a spinlock You currently cannot use "fasync_helper()" in an atomic environment to insert a new fasync entry, because it will need to allocate the new "struct fasync_struct". Yet fcntl_setlease() wants to call this under lock_flocks(), which is in the process of being converted from the BKL to a spinlock. In order to fix this, this abstracts out the actual fasync list insertion and the fasync allocations into functions of their own, and teaches fs/locks.c to pre-allocate the fasync_struct entry. That way the actual list insertion can happen while holding the required spinlock. Signed-off-by: Linus Torvalds [bfields@redhat.com: rebase on top of my changes to Arnd's patch] Tested-by: J. Bruce Fields Signed-off-by: Arnd Bergmann --- Reading git-diff-tree failed