From: Jeff Layton Date: Wed, 16 Jul 2014 14:31:57 +0000 (-0400) Subject: nfsd: Avoid taking state_lock while holding inode lock in nfsd_break_one_deleg X-Git-Tag: omap-for-v3.17/fixes-against-rc2~101^2~108 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02e1215f9f72ad8c087e21a5701bea0ac18fafd4;p=pandora-kernel.git nfsd: Avoid taking state_lock while holding inode lock in nfsd_break_one_deleg state_lock is a heavily contended global lock. We don't want to grab that while simultaneously holding the inode->i_lock. Add a new per-nfs4_file lock that we can use to protect the per-nfs4_file delegation list. Hold that while walking the list in the break_deleg callback and queue the workqueue job for each one. The workqueue job can then take the state_lock and do the list manipulations without the i_lock being held prior to starting the rpc call. Signed-off-by: Trond Myklebust Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed