cifs: add a helper to find an existing readable handle to a file
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 9 Sep 2019 05:30:00 +0000 (15:30 +1000)
committerSteve French <stfrench@microsoft.com>
Mon, 16 Sep 2019 16:43:38 +0000 (11:43 -0500)
commit496902dc173dead0e5eeba1f2fd4abd9ba6f2da0
tree196a00f93a641cb5e1cc4c9981c1e24dcfae66bb
parent563317ec3083f7e126d7e30821ff8505ac338ee5
cifs: add a helper to find an existing readable handle to a file

and convert smb2_query_path_info() to use it.
This will eliminate the need for a SMB2_Create when we already have an
open handle that can be used. This will also prevent a oplock break
in case the other handle holds a lease.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsproto.h
fs/cifs/file.c
fs/cifs/smb2inode.c