NFSD: Fix frame size warning in svc_export_parse()
authorChuck Lever <chuck.lever@oracle.com>
Sun, 1 Oct 2023 17:25:16 +0000 (13:25 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Oct 2023 16:44:39 +0000 (12:44 -0400)
commit6939ace1f22681fface7841cdbf34d3204cc94b5
tree5b9dc2d75be93cced74077b9c64a0426cce89aa1
parent5ec39944f874e1ecc09f624a70dfaa8ac3bf9d08
NFSD: Fix frame size warning in svc_export_parse()

fs/nfsd/export.c: In function 'svc_export_parse':
fs/nfsd/export.c:737:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    737 | }

On my systems, svc_export_parse() has a stack frame of over 800
bytes, not 1040, but nonetheless, it could do with some reduction.

When a struct svc_export is on the stack, it's a temporary structure
used as an argument, and not visible as an actual exported FS. No
need to reserve space for export_stats in such cases.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310012359.YEw5IrK6-lkp@intel.com/
Cc: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/export.c
fs/nfsd/export.h
fs/nfsd/stats.h