]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] put in-memory filesystem dirty pages on the correct list
authorAndrew Morton <akpm@zip.com.au>
Sun, 2 Jun 2002 10:24:04 +0000 (03:24 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 2 Jun 2002 10:24:04 +0000 (03:24 -0700)
Replaces SetPageDirty() with set_page_dirty() in several places related
to in-memory filesystems.

SetPageDirty() is basically always the wrong thing to do.  Pages should
be moved to the ->dirty_pages list when dirtied so that writeback can
see them.

Without this change, dirty pages against in-memory filesystems would
churn around on the inactive list all the time, rather than getting
pushed away onto the active list.  A minor efficiency thing.

mm/filemap.c
mm/shmem.c

index 419944ab6da6188e863b47d66ccb41f96c609f97..bf7be669af45f7f0a2ac0f476ad2ceaa0c83e354 100644 (file)
@@ -450,7 +450,7 @@ int fail_writepage(struct page *page)
        }
 
        /* Set the page dirty again, unlock */
-       SetPageDirty(page);
+       set_page_dirty(page);
        unlock_page(page);
        return 0;
 }
index fa365c4564488484442a3f136ff5bd108f51f24c..0644afd79f514b566f24d37397ea569040b26189 100644 (file)
@@ -854,7 +854,7 @@ shmem_file_write(struct file *file,const char *buf,size_t count,loff_t *ppos)
 
                flush_dcache_page(page);
                if (bytes > 0) {
-                       SetPageDirty(page);
+                       set_page_dirty(page);
                        written += bytes;
                        count -= bytes;
                        pos += bytes;
@@ -1139,7 +1139,7 @@ static int shmem_symlink(struct inode * dir, struct dentry *dentry, const char *
                kaddr = kmap(page);
                memcpy(kaddr, symname, len);
                kunmap(page);
-               SetPageDirty(page);
+               set_page_dirty(page);
                unlock_page(page);
                page_cache_release(page);
                up(&info->sem);