]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/rd.c
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / drivers / block / rd.c
index 08176d23a46cd421690aca1d13a2edecf1499b71..82f4eecc8699d19e42e899b043e2c45842cdbcc1 100644 (file)
@@ -189,6 +189,18 @@ 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,
@@ -196,6 +208,7 @@ static const struct address_space_operations ramdisk_aops = {
        .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,
@@ -365,7 +378,7 @@ static int rd_open(struct inode *inode, struct file *filp)
                /*
                 * Deep badness.  rd_blkdev_pagecache_IO() needs to allocate
                 * pagecache pages within a request_fn.  We cannot recur back
-                * into the filesytem which is mounted atop the ramdisk, because
+                * into the filesystem which is mounted atop the ramdisk, because
                 * that would deadlock on fs locks.  And we really don't want
                 * to reenter rd_blkdev_pagecache_IO when we're already within
                 * that function.