mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
freevxfs: Convert vxfs_immed to read_folio
This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
@@ -38,33 +38,34 @@
|
|||||||
#include "vxfs_inode.h"
|
#include "vxfs_inode.h"
|
||||||
|
|
||||||
|
|
||||||
static int vxfs_immed_readpage(struct file *, struct page *);
|
static int vxfs_immed_read_folio(struct file *, struct folio *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Address space operations for immed files and directories.
|
* Address space operations for immed files and directories.
|
||||||
*/
|
*/
|
||||||
const struct address_space_operations vxfs_immed_aops = {
|
const struct address_space_operations vxfs_immed_aops = {
|
||||||
.readpage = vxfs_immed_readpage,
|
.read_folio = vxfs_immed_read_folio,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vxfs_immed_readpage - read part of an immed inode into pagecache
|
* vxfs_immed_read_folio - read part of an immed inode into pagecache
|
||||||
* @file: file context (unused)
|
* @file: file context (unused)
|
||||||
* @page: page frame to fill in.
|
* @folio: folio to fill in.
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* vxfs_immed_readpage reads a part of the immed area of the
|
* vxfs_immed_read_folio reads a part of the immed area of the
|
||||||
* file that hosts @pp into the pagecache.
|
* file that hosts @pp into the pagecache.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Zero on success, else a negative error code.
|
* Zero on success, else a negative error code.
|
||||||
*
|
*
|
||||||
* Locking status:
|
* Locking status:
|
||||||
* @page is locked and will be unlocked.
|
* @folio is locked and will be unlocked.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
vxfs_immed_readpage(struct file *fp, struct page *pp)
|
vxfs_immed_read_folio(struct file *fp, struct folio *folio)
|
||||||
{
|
{
|
||||||
|
struct page *pp = &folio->page;
|
||||||
struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host);
|
struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host);
|
||||||
u_int64_t offset = (u_int64_t)pp->index << PAGE_SHIFT;
|
u_int64_t offset = (u_int64_t)pp->index << PAGE_SHIFT;
|
||||||
caddr_t kaddr;
|
caddr_t kaddr;
|
||||||
|
Reference in New Issue
Block a user