Sergey Vlasov 21ac19d484 NFS: Fix fcntl F_GETLK not reporting some conflicts
The commit 129a84de2347002f09721cda3155ccfd19fade40 (locks: fix F_GETLK
regression (failure to find conflicts)) fixed the posix_test_lock()
function by itself, however, its usage in NFS changed by the commit
9d6a8c5c213e34c475e72b245a8eb709258e968c (locks: give posix_test_lock
same interface as ->lock) remained broken - subsequent NFS-specific
locking code received F_UNLCK instead of the user-specified lock type.
To fix the problem, fl->fl_type needs to be saved before the
posix_test_lock() call and restored if no local conflicts were reported.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=23892
Tested-by: Alexander Morozov <amorozov@etersoft.ru>
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Cc: <stable@kernel.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-12-07 19:30:43 -05:00
..
2010-02-10 08:30:59 -05:00
2010-12-07 14:09:02 -05:00
2010-05-14 15:09:31 -04:00
2010-10-25 21:26:11 -04:00
2010-10-28 11:18:00 -04:00
2010-12-02 09:58:00 -05:00
2010-10-27 21:39:39 +02:00
2010-10-23 15:27:35 -04:00
2010-10-23 15:27:37 -04:00
2010-10-26 13:56:42 -04:00
2010-10-23 15:27:35 -04:00
2010-10-07 18:48:49 -04:00