J. Bruce Fields 55ef1274dd nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT
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 <eshel@almaden.ibm.com>
Tested-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-01-07 15:40:27 -05:00
..
2008-02-01 16:42:05 -05:00
2008-10-03 16:19:02 -04:00
2007-05-09 12:30:54 -07:00
2008-06-23 13:02:50 -04:00
2008-06-23 13:02:50 -04:00
2008-02-14 21:17:08 -08:00
2008-04-23 16:13:39 -04:00
2008-10-03 16:19:02 -04:00
2009-01-06 11:53:45 -05:00
2008-02-14 21:17:08 -08:00
2009-01-05 11:54:28 -05:00