• Petr Vandrovec's avatar
    [PATCH] Decrease stack usage in ncpfs's ioctl · a95eaa03
    Petr Vandrovec authored
    It decreases stack consumption in one of ncpfs's paths from 3000 to 2200
    bytes (and stack portion in ncpfs ioctl code from 1336 to 452 bytes).
    
    - some code used large structure (with embeded 256 bytes for filename)
      while it never passed filename around.  Use something smaller in
      ncp_conn_logged_in.  Decrease 616 => 300.
    
    - gcc-3.3 is very bad when it comes to parallel blocks in ioctl.  Split
      some branches from large switch to separate functions.  ncp_ioctl now
      uses 152 bytes of stack (instead of 720) and biggest child 64.
    Signed-off-by: default avatarPetr Vandrovec <vandrove@vc.cvut.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    a95eaa03
ncplib_kernel.c 33.4 KB