From: NeilBrown find_exported_dentry() declares char nbuf[NAME_MAX+1]; in 2 separate places, and gcc allocates space on the stack for both of them. Having just one of them will suffice, if we can put put with its scope. Reduces function stack usage on x86-32 from 0x230 to 0x130. Signed-off-by: Randy Dunlap Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 25-akpm/fs/exportfs/expfs.c | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) diff -puN fs/exportfs/expfs.c~nfsd--exportfs-reduce-stack-usage fs/exportfs/expfs.c --- 25/fs/exportfs/expfs.c~nfsd--exportfs-reduce-stack-usage 2005-02-07 19:19:05.000000000 -0800 +++ 25-akpm/fs/exportfs/expfs.c 2005-02-07 19:19:05.000000000 -0800 @@ -55,7 +55,7 @@ find_exported_dentry(struct super_block struct list_head *le, *head; struct dentry *toput = NULL; int noprogress; - + char nbuf[NAME_MAX+1]; /* * Attempt to find the inode. @@ -176,7 +176,6 @@ find_exported_dentry(struct super_block */ struct dentry *ppd; struct dentry *npd; - char nbuf[NAME_MAX+1]; down(&pd->d_inode->i_sem); ppd = CALL(nops,get_parent)(pd); @@ -241,7 +240,6 @@ find_exported_dentry(struct super_block /* if we weren't after a directory, have one more step to go */ if (result != target_dir) { struct dentry *nresult; - char nbuf[NAME_MAX+1]; err = CALL(nops,get_name)(target_dir, nbuf, result); if (!err) { down(&target_dir->d_inode->i_sem); _