• Al Viro's avatar
    AFS: Don't put struct file on the stack · f6d335c0
    Al Viro authored
    Don't put struct file on the stack as it takes up quite a lot of space
    and violates lifetime rules for struct file.
    
    Rather than calling afs_readpage() indirectly from the directory routines by
    way of read_mapping_page(), split afs_readpage() to have afs_page_filler()
    that's given a key instead of a file and call read_cache_page(), specifying the
    new function directly.  Use it in afs_readpages() as well.
    
    Also make use of this in afs_mntpt_check_symlink() too for the same reason.
    Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    f6d335c0
mntpt.c 6.56 KB