[GFS2] Pass the correct value to kunmap_atomic
authorRussell Cattelan <cattelan@redhat.com>
Thu, 12 Oct 2006 13:23:41 +0000 (09:23 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 12 Oct 2006 21:11:13 +0000 (17:11 -0400)
Pass kaddr rather than (incorrect) struct page to kunmap_atomic.

Signed-off-by: Russell Cattelan <cattelan@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/lops.c
fs/gfs2/ops_address.c

index 881e337b6a70ab8d7b9701d1d4b70380e2e79dba..ab6d1115f95d5fd2cfdb407a7338e0535fc9c487 100644 (file)
@@ -492,7 +492,7 @@ static int gfs2_check_magic(struct buffer_head *bh)
        ptr = kaddr + bh_offset(bh);
        if (*ptr == cpu_to_be32(GFS2_MAGIC))
                rv = 1;
-       kunmap_atomic(page, KM_USER0);
+       kunmap_atomic(kaddr, KM_USER0);
 
        return rv;
 }
@@ -626,7 +626,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
                                memcpy(bh->b_data,
                                       kaddr + bh_offset(bd2->bd_bh),
                                       sdp->sd_sb.sb_bsize);
-                               kunmap_atomic(page, KM_USER0);
+                               kunmap_atomic(kaddr, KM_USER0);
                                *(__be32 *)bh->b_data = 0;
                        } else {
                                bh = gfs2_log_fake_buf(sdp, bd2->bd_bh);
index 99c933762eb278c39543bed91336c95f3e443d0e..e0599fed99ce0ff8e5f4a8786a469fdcfb911152 100644 (file)
@@ -162,7 +162,7 @@ static int zero_readpage(struct page *page)
 
        kaddr = kmap_atomic(page, KM_USER0);
        memset(kaddr, 0, PAGE_CACHE_SIZE);
-       kunmap_atomic(page, KM_USER0);
+       kunmap_atomic(kaddr, KM_USER0);
 
        SetPageUptodate(page);
 
@@ -195,7 +195,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
        memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode),
               ip->i_di.di_size);
        memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - ip->i_di.di_size);
-       kunmap_atomic(page, KM_USER0);
+       kunmap_atomic(kaddr, KM_USER0);
 
        brelse(dibh);
 
@@ -485,7 +485,7 @@ static int gfs2_commit_write(struct file *file, struct page *page,
                kaddr = kmap_atomic(page, KM_USER0);
                memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from,
                       kaddr + from, to - from);
-               kunmap_atomic(page, KM_USER0);
+               kunmap_atomic(kaddr, KM_USER0);
 
                SetPageUptodate(page);