]> err.no Git - linux-2.6/blobdiff - mm/filemap.c
[GFS2] Speed up scanning of glocks
[linux-2.6] / mm / filemap.c
index 87d62c44c3f0647ad6a0a583a9c80ed923b9467c..d9bbea1e87d23a6f153374a4635332c499ce480e 100644 (file)
@@ -9,7 +9,6 @@
  * most "normal" filesystems (but you don't /have/ to use this:
  * the NFS filesystem used to do this differently, for example)
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/compiler.h>
@@ -850,8 +849,6 @@ static void shrink_readahead_size_eio(struct file *filp,
                return;
 
        ra->ra_pages /= 4;
-       printk(KERN_WARNING "Reducing readahead size to %luK\n",
-                       ra->ra_pages << (PAGE_CACHE_SHIFT - 10));
 }
 
 /**
@@ -1184,7 +1181,8 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
                                *ppos = pos + retval;
                }
                file_accessed(filp);
-               goto out;
+               if (retval != 0)
+                       goto out;
        }
 
        retval = 0;
@@ -1416,7 +1414,7 @@ retry_find:
                 */
                if (!did_readaround) {
                        majmin = VM_FAULT_MAJOR;
-                       inc_page_state(pgmajfault);
+                       count_vm_event(PGMAJFAULT);
                }
                did_readaround = 1;
                ra_pages = max_sane_readahead(file->f_ra.ra_pages);
@@ -1487,7 +1485,7 @@ no_cached_page:
 page_not_uptodate:
        if (!did_readaround) {
                majmin = VM_FAULT_MAJOR;
-               inc_page_state(pgmajfault);
+               count_vm_event(PGMAJFAULT);
        }
        lock_page(page);