From: J. Bruce Fields Date: Sat, 20 Dec 2008 19:58:38 +0000 (-0800) Subject: nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT X-Git-Tag: v2.6.27.15~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f014c81fac572256eaeff5ac31e8f58d1888ab1;p=pandora-kernel.git nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT commit 55ef1274dddd4de387c54d110e354ffbb6cdc706 upstream. Since nfsv4 allows LOCKT without an open, but the ->lock() method is a file method, we fake up a struct file in the nfsv4 code with just the fields we need initialized. But we forgot to initialize the file operations, with the result that LOCKT never results in a call to the filesystem's ->lock() method (if it exists). We could just add that one more initialization. But this hack of faking up a struct file with only some fields initialized seems the kind of thing that might cause more problems in the future. We should either do an open and get a real struct file, or make lock-testing an inode (not a file) method. This patch does the former. Reported-by: Marc Eshel Tested-by: Marc Eshel Signed-off-by: J. Bruce Fields Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed