locks: prevent side-effects of locks_release_private before file_lock is initialized
authorFilipe Brandenburger <filbranden@gmail.com>
Fri, 27 Jul 2012 04:42:52 +0000 (00:42 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 27 Jul 2012 13:39:55 +0000 (09:39 -0400)
commit3b6e2723f32de42028617f2c99b244ccd72cd959
treeaa16a8fdef80496ef394aa75c1d5cf9fd137252d
parent57c8b13e3cd0f94944c9691ce7f58e5fcef8a12d
locks: prevent side-effects of locks_release_private before file_lock is initialized

When calling fcntl(fd, F_SETLEASE, lck) [with lck=F_WRLCK or F_RDLCK],
the custom signal or owner (if any were previously set using F_SETSIG
or F_SETOWN fcntls) would be reset when F_SETLEASE was called for the
second time on the same file descriptor.

This bug is a regression of 2.6.37 and is described here:
https://bugzilla.kernel.org/show_bug.cgi?id=43336

This patch reverts a commit from Oct 2004 (with subject "nfs4 lease:
move the f_delown processing") which originally introduced the
lm_release_private callback.

Signed-off-by: Filipe Brandenburger <filbranden@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/locks.c