Message ID | 20230728195010.19122-3-pc@manguebit.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/8] smb: client: reduce stack usage in cifs_try_adding_channels() | expand |
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c index c3eeae07e139..7f2a7b22427c 100644 --- a/fs/smb/client/inode.c +++ b/fs/smb/client/inode.c @@ -473,9 +473,10 @@ int cifs_get_inode_info_unix(struct inode **pinode, } #endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */ -static int -cifs_sfu_type(struct cifs_fattr *fattr, const char *path, - struct cifs_sb_info *cifs_sb, unsigned int xid) +static noinline_for_stack int cifs_sfu_type(struct cifs_fattr *fattr, + const char *path, + struct cifs_sb_info *cifs_sb, + unsigned int xid) { int rc; __u32 oplock;
Clang warns about exceeded stack frame size fs/smb/client/inode.c:963:5: warning: stack frame size (1144) exceeds limit (1024) in 'cifs_get_inode_info' [-Wframe-larger-than] It turns out that cifs_sfu_type() got inlined into cifs_get_inode_info() which contains some stack-allocated variables like @fid(96), @oparms(56), @io_parms(64), @buf(24). Fix this by marking cifs_sfu_type() as noinline_for_stack. Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> --- fs/smb/client/inode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)