ANDROID: fs: afs: fix filler function type

Bug: 67506682
Change-Id: I76d208c8606ee5af144891d14bd309912d4d788d
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
Sami Tolvanen 2018-03-02 09:02:16 -08:00 committed by Amit Pundir
parent e7b91c0405
commit 099e24bfa7
2 changed files with 11 additions and 5 deletions

View file

@ -260,12 +260,11 @@ int afs_fetch_data(struct afs_vnode *vnode, struct key *key, struct afs_read *de
/*
* read page from file, directory or symlink, given a key to use
*/
int afs_page_filler(void *data, struct page *page)
static int __afs_page_filler(struct key *key, struct page *page)
{
struct inode *inode = page->mapping->host;
struct afs_vnode *vnode = AFS_FS_I(inode);
struct afs_read *req;
struct key *key = data;
int ret;
_enter("{%x},{%lu},{%lu}", key_serial(key), inode->i_ino, page->index);
@ -372,6 +371,13 @@ int afs_page_filler(void *data, struct page *page)
return ret;
}
int afs_page_filler(struct file *data, struct page *page)
{
struct key *key = (struct key *)data;
return __afs_page_filler(key, page);
}
/*
* read page from file, directory or symlink, given a file to nominate the key
* to be used
@ -384,14 +390,14 @@ static int afs_readpage(struct file *file, struct page *page)
if (file) {
key = afs_file_key(file);
ASSERT(key != NULL);
ret = afs_page_filler(key, page);
ret = __afs_page_filler(key, page);
} else {
struct inode *inode = page->mapping->host;
key = afs_request_key(AFS_FS_S(inode->i_sb)->cell);
if (IS_ERR(key)) {
ret = PTR_ERR(key);
} else {
ret = afs_page_filler(key, page);
ret = __afs_page_filler(key, page);
key_put(key);
}
}

View file

@ -752,7 +752,7 @@ extern void afs_put_wb_key(struct afs_wb_key *);
extern int afs_open(struct inode *, struct file *);
extern int afs_release(struct inode *, struct file *);
extern int afs_fetch_data(struct afs_vnode *, struct key *, struct afs_read *);
extern int afs_page_filler(void *, struct page *);
extern int afs_page_filler(struct file *, struct page *);
extern void afs_put_read(struct afs_read *);
/*