mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
brd: add support for rw_page()
Signed-off-by: Matthew Wilcox <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Dheeraj Reddy <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dd6bd0d9c7
commit
a72132c31d
1 changed files with 10 additions and 0 deletions
|
|
@ -360,6 +360,15 @@ out:
|
|||
bio_endio(bio, err);
|
||||
}
|
||||
|
||||
static int brd_rw_page(struct block_device *bdev, sector_t sector,
|
||||
struct page *page, int rw)
|
||||
{
|
||||
struct brd_device *brd = bdev->bd_disk->private_data;
|
||||
int err = brd_do_bvec(brd, page, PAGE_CACHE_SIZE, 0, rw, sector);
|
||||
page_endio(page, rw & WRITE, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_XIP
|
||||
static int brd_direct_access(struct block_device *bdev, sector_t sector,
|
||||
void **kaddr, unsigned long *pfn)
|
||||
|
|
@ -419,6 +428,7 @@ static int brd_ioctl(struct block_device *bdev, fmode_t mode,
|
|||
|
||||
static const struct block_device_operations brd_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.rw_page = brd_rw_page,
|
||||
.ioctl = brd_ioctl,
|
||||
#ifdef CONFIG_BLK_DEV_XIP
|
||||
.direct_access = brd_direct_access,
|
||||
|
|
|
|||
Loading…
Reference in a new issue