J. Bruce Fields acfdf5c383 nfsd4: acquire only one lease per file
Instead of acquiring one lease each time another client opens a file,
nfsd can acquire just one lease to represent all of them, and reference
count it to determine when to release it.

This fixes a regression introduced by
c45821d263a8a5109d69a9e8942b8d65bcd5f31a "locks: eliminate fl_mylease
callback": after that patch, only the struct file * is used to determine
who owns a given lease.  But since we recently converted the server to
share a single struct file per open, if we acquire multiple leases on
the same file from nfsd, it then becomes impossible on unlocking a lease
to determine which of those leases (all of whom share the same struct
file *) we meant to remove.

Thanks to Takashi Iwai <tiwai@suse.de> for catching a bug in a previous
version of this patch.

Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2011-02-14 10:35:19 -05:00
..
2011-01-04 18:22:10 -05:00
2008-02-01 16:42:05 -05:00
2010-10-27 21:39:39 +02:00
2007-05-09 12:30:54 -07:00
2011-01-11 15:04:09 -05:00
2009-12-20 20:19:51 -08:00
2011-01-04 16:49:22 -05:00
2011-02-14 10:35:19 -05:00
2010-07-30 12:54:54 -04:00