J. Bruce Fields 6dfc954efb lockd: fix failure to cleanup client locks
commit d19a7af73b5ecaac8168712d18be72b9db166768 upstream.

In my testing, we're sometimes hitting the request->fl_flags & FL_EXISTS
case in posix_lock_inode, presumably just by random luck since we're not
actually initializing fl_flags here.

This probably didn't matter before commit 7f024fcd5c97 ("Keep read and
write fds with each nlm_file") since we wouldn't previously unlock
unless we knew there were locks.

But now it causes lockd to give up on removing more locks.

We could just initialize fl_flags, but really it seems dubious to be
calling vfs_lock_file with random values in some of the fields.

Fixes: 7f024fcd5c97 ("Keep read and write fds with each nlm_file")
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
[ cel: fixed checkpatch.pl nit ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-05 12:38:57 +01:00
..
2021-12-22 09:32:45 +01:00
2021-08-19 09:02:55 +09:00
2021-09-02 12:32:12 -07:00
2021-08-26 22:28:02 +02:00
2021-11-18 19:16:48 +01:00
2021-12-29 12:28:59 +01:00
2021-09-10 09:46:48 -07:00
2021-06-29 10:53:48 -07:00
2021-09-03 15:33:47 -07:00
2021-08-16 10:50:32 -06:00
2021-08-19 09:02:55 +09:00
2021-12-22 09:32:48 +01:00
2021-11-25 09:48:46 +01:00
2021-08-31 11:13:35 -07:00
2021-09-09 13:25:49 -07:00
2021-11-25 09:49:08 +01:00
2021-08-31 11:06:32 -07:00
2021-06-29 10:53:48 -07:00
2021-08-18 22:08:24 +02:00
2021-12-14 10:57:15 +01:00
2021-08-10 17:57:22 +02:00