]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: initialize delegation pointer to lease
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 30 Oct 2010 21:31:16 +0000 (17:31 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 31 Oct 2010 01:08:15 +0000 (18:08 -0700)
commitcfe31246cb7d3119d283cea8c2a15b1986eb6e7e
tree4d4094cb2e04b391bd11eedf1466245dc8403704
parentbf69317151a1342363901b1bbc7c7ff0768aa1de
nfsd4: initialize delegation pointer to lease

The NFSv4 server was initializing the dp->dl_flock pointer by the
somewhat ridiculous method of a locks_copy_lock callback.

Now that setlease uses the passed-in lock instead of doing a copy,
dl_flock no longer gets set, resulting in the lock leaking on delegation
release, and later possible hangs (among other problems).

So, initialize dl_flock and get rid of the callback.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfsd/nfs4state.c