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
parent f67385227a
commit 53f4adf678
2 changed files with 11 additions and 5 deletions

View File

@ -123,11 +123,10 @@ static void afs_file_readpage_read_complete(struct page *page,
/*
* 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 key *key = data;
size_t len;
off_t offset;
int ret;
@ -209,6 +208,13 @@ error:
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
@ -221,14 +227,14 @@ static int afs_readpage(struct file *file, struct page *page)
if (file) {
key = file->private_data;
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)->volume->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

@ -497,7 +497,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 *);
extern int afs_page_filler(struct file *, struct page *);
/*
* flock.c