diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2019-09-09 08:30:00 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-09-16 19:43:38 +0300 |
commit | 496902dc173dead0e5eeba1f2fd4abd9ba6f2da0 (patch) | |
tree | 196a00f93a641cb5e1cc4c9981c1e24dcfae66bb /fs/cifs/cifsproto.h | |
parent | 563317ec3083f7e126d7e30821ff8505ac338ee5 (diff) | |
download | linux-496902dc173dead0e5eeba1f2fd4abd9ba6f2da0.tar.xz |
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>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 7b69037bed24..99b1b1ef558c 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -140,6 +140,8 @@ extern int cifs_get_writable_file(struct cifsInodeInfo *cifs_inode, extern int cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, struct cifsFileInfo **ret_file); extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *, bool); +extern int cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, + struct cifsFileInfo **ret_file); extern unsigned int smbCalcSize(void *buf, struct TCP_Server_Info *server); extern int decode_negTokenInit(unsigned char *security_blob, int length, struct TCP_Server_Info *server); |