summaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2010-05-21 15:27:09 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:28 -0400
commitf6d335c08df48b318187a087c9c38ba3d416e115 (patch)
treeccee5ad0c46fea4c34d435d5d869f43394dd9a81 /fs/afs/internal.h
parent4403158ba295c8e36f6736b1bb12d0f7e1923dac (diff)
downloadop-kernel-dev-f6d335c08df48b318187a087c9c38ba3d416e115.zip
op-kernel-dev-f6d335c08df48b318187a087c9c38ba3d416e115.tar.gz
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>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r--fs/afs/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index a10f258..807f284 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -494,6 +494,7 @@ extern const struct file_operations afs_file_operations;
extern int afs_open(struct inode *, struct file *);
extern int afs_release(struct inode *, struct file *);
+extern int afs_page_filler(void *, struct page *);
/*
* flock.c
OpenPOWER on IntegriCloud