summaryrefslogtreecommitdiff
path: root/fs/smb/client/cifsglob.h
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-08-17 12:34:13 -0300
committerSteve French <stfrench@microsoft.com>2023-08-20 16:05:50 -0500
commitf4e5ceb6c1a64f9f8c666877164d95d5eb46da5b (patch)
tree5a549fcf13a60ba562045911f3e92fd6f05c04ce /fs/smb/client/cifsglob.h
parent933148a47c8b3db569cb92888571a57b8c171f3b (diff)
smb: client: reduce stack usage in smb2_set_ea()
Clang warns about exceeded stack frame size fs/smb/client/smb2ops.c:1080:1: warning: stack frame size (1432) exceeds limit (1024) in 'smb2_set_ea' [-Wframe-larger-than] Fix this by allocating a structure that will hold most of the large variables. Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r--fs/smb/client/cifsglob.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 6d5fa0351dce..1588f98660aa 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -2214,4 +2214,17 @@ static inline void cifs_sg_set_buf(struct sg_table *sgtable,
}
}
+struct smb2_compound_vars {
+ struct cifs_open_parms oparms;
+ struct kvec rsp_iov[3];
+ struct smb_rqst rqst[3];
+ struct kvec open_iov[SMB2_CREATE_IOV_SIZE];
+ struct kvec qi_iov;
+ struct kvec io_iov[SMB2_IOCTL_IOV_SIZE];
+ struct kvec si_iov[SMB2_SET_INFO_IOV_SIZE];
+ struct kvec close_iov;
+ struct smb2_file_rename_info rename_info;
+ struct smb2_file_link_info link_info;
+};
+
#endif /* _CIFS_GLOB_H */