Commit ef70d82a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ramdisk: implement writepages()

Implement an empty ->writepages() so that attempts to write back ramdisk pages
have less work to do.
parent bf1570fe
......@@ -160,6 +160,16 @@ static int ramdisk_writepage(struct page *page, struct writeback_control *wbc)
return 0;
}
/*
* This is a little speedup thing: short-circuit attempts to write back the
* ramdisk blockdev inode to its non-existent backing store.
*/
static int ramdisk_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
return 0;
}
/*
* ramdisk blockdev pages have their own ->set_page_dirty() because we don't
* want them to contribute to dirty memory accounting.
......@@ -176,6 +186,7 @@ static struct address_space_operations ramdisk_aops = {
.commit_write = ramdisk_commit_write,
.writepage = ramdisk_writepage,
.set_page_dirty = ramdisk_set_page_dirty,
.writepages = ramdisk_writepages,
};
static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment