From: Trond Myklebust Date: Tue, 12 Feb 2013 14:48:42 +0000 (-0500) Subject: NFSv4.1: Fix bulk recall and destroy of layouts X-Git-Tag: v3.9-rc1~132^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd9a8d7160937f94aad36ac80d7255b4988740ac;p=pandora-kernel.git NFSv4.1: Fix bulk recall and destroy of layouts The current code in pnfs_destroy_all_layouts() assumes that removing the layout from the server->layouts list is sufficient to make it invisible to other processes. This ignores the fact that most users access the layout through the nfs_inode->layout... There is further breakage due to lack of reference counting of the layouts, meaning that the whole thing Oopses at the drop of a hat. The code in initiate_bulk_draining() is almost correct, and can be used as a model for pnfs_destroy_all_layouts(), so move that code to pnfs.c, and refactor the code to allow us to choose between a single filesystem bulk recall, and a recall of all layouts. Also note that initiate_bulk_draining() currently calls iput() while holding locks. Fix that too. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org --- Reading git-diff-tree failed