AFS: Don't put struct file on the stack
authorAl Viro <viro@ZenIV.linux.org.uk>
Fri, 21 May 2010 14:27:09 +0000 (15:27 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 21 May 2010 22:31:28 +0000 (18:31 -0400)
commitf6d335c08df48b318187a087c9c38ba3d416e115
treeccee5ad0c46fea4c34d435d5d869f43394dd9a81
parent4403158ba295c8e36f6736b1bb12d0f7e1923dac
AFS: Don't put struct file on the stack

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: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/dir.c
fs/afs/file.c
fs/afs/internal.h
fs/afs/mntpt.c