summaryrefslogtreecommitdiff
path: root/fs/smb/client/smb1ops.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-08-17 18:34:07 +0300
committerSteve French <stfrench@microsoft.com>2023-08-21 00:05:50 +0300
commit9a49e221a64111535f65e9c8804db24d11eaff8b (patch)
treeb4c28e1ea18d25f1276f5fb0d7be7a1a423e75fb /fs/smb/client/smb1ops.c
parent5f71ebc412944908c9780cca5acc9170385b6e77 (diff)
downloadlinux-9a49e221a64111535f65e9c8804db24d11eaff8b.tar.xz
smb: client: do not query reparse points twice on symlinks
Save a roundtrip by getting the reparse point tag and buffer at once in ->query_reparse_point() and then pass the buffer down to ->query_symlink(). Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/smb1ops.c')
-rw-r--r--fs/smb/client/smb1ops.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c
index 094ef4fe2219..9bf8735cdd1e 100644
--- a/fs/smb/client/smb1ops.c
+++ b/fs/smb/client/smb1ops.c
@@ -972,13 +972,16 @@ cifs_unix_dfs_readlink(const unsigned int xid, struct cifs_tcon *tcon,
#endif
}
-static int
-cifs_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
- struct cifs_sb_info *cifs_sb, const char *full_path,
- char **target_path, bool is_reparse_point)
+static int cifs_query_symlink(const unsigned int xid,
+ struct cifs_tcon *tcon,
+ struct cifs_sb_info *cifs_sb,
+ const char *full_path,
+ char **target_path,
+ struct kvec *rsp_iov)
{
int rc;
int oplock = 0;
+ bool is_reparse_point = !!rsp_iov;
struct cifs_fid fid;
struct cifs_open_parms oparms;