From: Trond Myklebust Date: Fri, 5 Apr 2013 20:11:11 +0000 (-0400) Subject: NFSv4/4.1: Fix bugs in nfs4[01]_walk_client_list X-Git-Tag: v3.9-rc7~29^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1f1fd1842e6ede25183c267ae733a7f67f00bc;p=pandora-kernel.git NFSv4/4.1: Fix bugs in nfs4[01]_walk_client_list It is unsafe to use list_for_each_entry_safe() here, because when we drop the nn->nfs_client_lock, we pin the _current_ list entry and ensure that it stays in the list, but we don't do the same for the _next_ list entry. Use of list_for_each_entry() is therefore the correct thing to do. Also fix the refcounting in nfs41_walk_client_list(). Finally, ensure that the nfs_client has finished being initialised and, in the case of NFSv4.1, that the session is set up. Signed-off-by: Trond Myklebust Cc: Chuck Lever Cc: Bryan Schumaker Cc: stable@vger.kernel.org [>= 3.7] --- Reading git-diff-tree failed