[GFS2] Update copyright date to 2006
[profile/ivi/kernel-adaptation-intel-automotive.git] / fs / gfs2 / ops_vm.c
index bfeb920..263c1fb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
- * Copyright (C) 2004-2005 Red Hat, Inc.  All rights reserved.
+ * Copyright (C) 2004-2006 Red Hat, Inc.  All rights reserved.
  *
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
 #include <linux/buffer_head.h>
 #include <linux/mm.h>
 #include <linux/pagemap.h>
-#include <asm/semaphore.h>
+#include <linux/gfs2_ondisk.h>
 
 #include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
 #include "bmap.h"
 #include "glock.h"
 #include "inode.h"
@@ -25,6 +27,7 @@
 #include "quota.h"
 #include "rgrp.h"
 #include "trans.h"
+#include "util.h"
 
 static void pfault_be_greedy(struct gfs2_inode *ip)
 {
@@ -43,7 +46,7 @@ static void pfault_be_greedy(struct gfs2_inode *ip)
 static struct page *gfs2_private_nopage(struct vm_area_struct *area,
                                        unsigned long address, int *type)
 {
-       struct gfs2_inode *ip = get_v2ip(area->vm_file->f_mapping->host);
+       struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip;
        struct gfs2_holder i_gh;
        struct page *result;
        int error;
@@ -86,8 +89,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
        if (error)
                goto out_gunlock_q;
 
-       gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE,
-                             &data_blocks, &ind_blocks);
+       gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks);
 
        al->al_requested = data_blocks + ind_blocks;
 
@@ -95,8 +97,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
        if (error)
                goto out_gunlock_q;
 
-       error = gfs2_trans_begin(sdp,
-                                al->al_rgd->rd_ri.ri_length +
+       error = gfs2_trans_begin(sdp, al->al_rgd->rd_ri.ri_length +
                                 ind_blocks + RES_DINODE +
                                 RES_STATFS + RES_QUOTA, 0);
        if (error)
@@ -113,7 +114,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
                unsigned int extlen;
                int new = 1;
 
-               error = gfs2_block_map(ip, lblock, &new, &dblock, &extlen);
+               error = gfs2_extent_map(ip->i_vnode, lblock, &new, &dblock, &extlen);
                if (error)
                        goto out_trans;
 
@@ -141,7 +142,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
 static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area,
                                           unsigned long address, int *type)
 {
-       struct gfs2_inode *ip = get_v2ip(area->vm_file->f_mapping->host);
+       struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip;
        struct gfs2_holder i_gh;
        struct page *result = NULL;
        unsigned long index = ((address - area->vm_start) >> PAGE_CACHE_SHIFT) +