Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73718
b: refs/heads/master
c: 5d0360e
h: refs/heads/master
v: v3
  • Loading branch information
Christian Borntraeger authored and Linus Torvalds committed Nov 15, 2007
1 parent b5e32cb commit 47d145b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 822bd5aa2b8e8fa1d328f03bf5b9c75701481bf0
refs/heads/master: 5d0360ee96a5ef953dbea45873c2a8c87e77d59b
13 changes: 13 additions & 0 deletions trunk/drivers/block/rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,26 @@ static int ramdisk_set_page_dirty(struct page *page)
return 0;
}

/*
* releasepage is called by pagevec_strip/try_to_release_page if
* buffers_heads_over_limit is true. Without a releasepage function
* try_to_free_buffers is called instead. That can unset the dirty
* bit of our ram disk pages, which will be eventually freed, even
* if the page is still in use.
*/
static int ramdisk_releasepage(struct page *page, gfp_t dummy)
{
return 0;
}

static const struct address_space_operations ramdisk_aops = {
.readpage = ramdisk_readpage,
.prepare_write = ramdisk_prepare_write,
.commit_write = ramdisk_commit_write,
.writepage = ramdisk_writepage,
.set_page_dirty = ramdisk_set_page_dirty,
.writepages = ramdisk_writepages,
.releasepage = ramdisk_releasepage,
};

static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector,
Expand Down

0 comments on commit 47d145b

Please sign in to comment.