From: Trond Myklebust Date: Mon, 30 Jun 2014 15:48:31 +0000 (-0400) Subject: nfsd: Protect addition to the file_hashtbl X-Git-Tag: omap-for-v3.17/fixes-against-rc2~101^2~146 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=950e0118d06fae26e07b283b83e96124a2075a1d;p=pandora-kernel.git nfsd: Protect addition to the file_hashtbl Current code depends on the client_mutex to guarantee a single struct nfs4_file per inode in the file_hashtbl and make addition atomic with respect to lookup. Rely instead on the state_Lock, to make it easier to stop taking the client_mutex here later. To prevent an i_lock/state_lock inversion, change nfsd4_init_file to use ihold instead if igrab. That's also more efficient anyway as we definitely hold a reference to the inode at that point. 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