]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Check the lease context if we actually got a lease
authorRonnie Sahlberg <lsahlber@redhat.com>
Fri, 17 Feb 2023 03:35:00 +0000 (13:35 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:06 +0000 (09:34 +0100)
commit357ae7e15b63db3bfbeaf66565a9546bf2acb0ea
tree19da892be2a5bd56d1c8cc4e21ae79653f2a490f
parent5864003ae07c41282e8699bf6e3a247d441be7df
cifs: Check the lease context if we actually got a lease

commit f3a0f3bf470d552d79b9d870d54b86549f572fd2 upstream.

Some servers may return that we got a lease in rsp->OplockLevel
but then in the lease context contradict this and say we got no lease
at all.  Thus we need to check the context if we have a lease.
Additionally, If we do not get a lease we need to make sure we close
the handle before we return an error to the caller.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cached_dir.c