]> err.no Git - linux-2.6/blobdiff - fs/gfs2/ops_vm.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
[linux-2.6] / fs / gfs2 / ops_vm.c
index 32ec8574ac8e3447f9cb1e9fcc26cd6ebeddd96d..aa0dbd2aac1bd31bdd3cb4ebf8265fe9b874d47d 100644 (file)
@@ -7,7 +7,6 @@
  * of the GNU General Public License version 2.
  */
 
-#include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/completion.h>
@@ -15,9 +14,9 @@
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/gfs2_ondisk.h>
+#include <linux/lm_interface.h>
 
 #include "gfs2.h"
-#include "lm_interface.h"
 #include "incore.h"
 #include "bmap.h"
 #include "glock.h"
 #include "trans.h"
 #include "util.h"
 
-static void pfault_be_greedy(struct gfs2_inode *ip)
-{
-       unsigned int time;
-
-       spin_lock(&ip->i_spin);
-       time = ip->i_greedy;
-       ip->i_last_pfault = jiffies;
-       spin_unlock(&ip->i_spin);
-
-       igrab(&ip->i_inode);
-       if (gfs2_glock_be_greedy(ip->i_gl, time))
-               iput(&ip->i_inode);
-}
-
 static struct page *gfs2_private_nopage(struct vm_area_struct *area,
                                        unsigned long address, int *type)
 {
        struct gfs2_inode *ip = GFS2_I(area->vm_file->f_mapping->host);
-       struct page *result;
 
        set_bit(GIF_PAGED, &ip->i_flags);
-
-       result = filemap_nopage(area, address, type);
-
-       if (result && result != NOPAGE_OOM)
-               pfault_be_greedy(ip);
-
-       return result;
+       return filemap_nopage(area, address, type);
 }
 
 static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
 {
        struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
        unsigned long index = page->index;
-       uint64_t lblock = index << (PAGE_CACHE_SHIFT -
+       u64 lblock = index << (PAGE_CACHE_SHIFT -
                                    sdp->sd_sb.sb_bsize_shift);
        unsigned int blocks = PAGE_CACHE_SIZE >> sdp->sd_sb.sb_bsize_shift;
        struct gfs2_alloc *al;
@@ -76,7 +54,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
        if (error)
                goto out;
 
-       error = gfs2_quota_check(ip, ip->i_di.di_uid, ip->i_di.di_gid);
+       error = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid);
        if (error)
                goto out_gunlock_q;
 
@@ -101,7 +79,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
        }
 
        for (x = 0; x < blocks; ) {
-               uint64_t dblock;
+               u64 dblock;
                unsigned int extlen;
                int new = 1;
 
@@ -167,7 +145,6 @@ static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area,
                set_page_dirty(result);
        }
 
-       pfault_be_greedy(ip);
 out:
        gfs2_glock_dq_uninit(&i_gh);