From 9a49e221a64111535f65e9c8804db24d11eaff8b Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Thu, 17 Aug 2023 12:34:07 -0300 Subject: 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) Signed-off-by: Steve French --- fs/smb/client/smb1ops.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'fs/smb/client/smb1ops.c') 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; -- cgit v1.2.3-58-ga151