[PATCH] mark address_space_operations const
[deliverable/linux.git] / drivers / block / rd.c
index 1c54f46d3f701bff756cfcd385a5eac38ac65a8c..0378da04cfa23c0c38b967a0162aee3563119171 100644 (file)
@@ -186,11 +186,12 @@ static int ramdisk_writepages(struct address_space *mapping,
  */
 static int ramdisk_set_page_dirty(struct page *page)
 {
-       SetPageDirty(page);
+       if (!TestSetPageDirty(page))
+               return 1;
        return 0;
 }
 
-static struct address_space_operations ramdisk_aops = {
+static const struct address_space_operations ramdisk_aops = {
        .readpage       = ramdisk_readpage,
        .prepare_write  = ramdisk_prepare_write,
        .commit_write   = ramdisk_commit_write,
This page took 0.026326 seconds and 5 git commands to generate.