summaryrefslogtreecommitdiffstats
path: root/fs/smb/client/cifsproto.h
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-11-25 23:55:05 -0300
committerSteve French <stfrench@microsoft.com>2024-01-07 15:46:05 -0600
commit67ec9949b0dfe78c99e110dd975eb7dc5645630c (patch)
tree5953ae20533a50ad3990bdcea0a7f6fd79b7208b /fs/smb/client/cifsproto.h
parent102466f303ffcd5cff207b3c122557f73f1041e6 (diff)
downloadlinux-stable-67ec9949b0dfe78c99e110dd975eb7dc5645630c.tar.gz
linux-stable-67ec9949b0dfe78c99e110dd975eb7dc5645630c.tar.bz2
linux-stable-67ec9949b0dfe78c99e110dd975eb7dc5645630c.zip
smb: client: optimise reparse point querying
Reduce number of roundtrips to server when querying reparse points in ->query_path_info() by sending a single compound request of create+get_reparse+get_info+close. Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsproto.h')
-rw-r--r--fs/smb/client/cifsproto.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h
index 0adeaa84b662..4c5d533d98a3 100644
--- a/fs/smb/client/cifsproto.h
+++ b/fs/smb/client/cifsproto.h
@@ -764,4 +764,11 @@ static inline void release_mid(struct mid_q_entry *mid)
kref_put(&mid->refcount, __release_mid);
}
+static inline void cifs_free_open_info(struct cifs_open_info_data *data)
+{
+ kfree(data->symlink_target);
+ free_rsp_buf(data->reparse.io.buftype, data->reparse.io.iov.iov_base);
+ memset(data, 0, sizeof(*data));
+}
+
#endif /* _CIFSPROTO_H */