Commit c312c4fd authored by Russell Cattelan's avatar Russell Cattelan Committed by Steven Whitehouse

[GFS2] Pass the correct value to kunmap_atomic

Pass kaddr rather than (incorrect) struct page to kunmap_atomic.
Signed-off-by: default avatarRussell Cattelan <cattelan@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent fe1a698f
...@@ -492,7 +492,7 @@ static int gfs2_check_magic(struct buffer_head *bh) ...@@ -492,7 +492,7 @@ static int gfs2_check_magic(struct buffer_head *bh)
ptr = kaddr + bh_offset(bh); ptr = kaddr + bh_offset(bh);
if (*ptr == cpu_to_be32(GFS2_MAGIC)) if (*ptr == cpu_to_be32(GFS2_MAGIC))
rv = 1; rv = 1;
kunmap_atomic(page, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
return rv; return rv;
} }
...@@ -626,7 +626,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) ...@@ -626,7 +626,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
memcpy(bh->b_data, memcpy(bh->b_data,
kaddr + bh_offset(bd2->bd_bh), kaddr + bh_offset(bd2->bd_bh),
sdp->sd_sb.sb_bsize); sdp->sd_sb.sb_bsize);
kunmap_atomic(page, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
*(__be32 *)bh->b_data = 0; *(__be32 *)bh->b_data = 0;
} else { } else {
bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); bh = gfs2_log_fake_buf(sdp, bd2->bd_bh);
......
...@@ -162,7 +162,7 @@ static int zero_readpage(struct page *page) ...@@ -162,7 +162,7 @@ static int zero_readpage(struct page *page)
kaddr = kmap_atomic(page, KM_USER0); kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr, 0, PAGE_CACHE_SIZE); memset(kaddr, 0, PAGE_CACHE_SIZE);
kunmap_atomic(page, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
SetPageUptodate(page); SetPageUptodate(page);
...@@ -195,7 +195,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *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), memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode),
ip->i_di.di_size); ip->i_di.di_size);
memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - 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); brelse(dibh);
...@@ -485,7 +485,7 @@ static int gfs2_commit_write(struct file *file, struct page *page, ...@@ -485,7 +485,7 @@ static int gfs2_commit_write(struct file *file, struct page *page,
kaddr = kmap_atomic(page, KM_USER0); kaddr = kmap_atomic(page, KM_USER0);
memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from, memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from,
kaddr + from, to - from); kaddr + from, to - from);
kunmap_atomic(page, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
SetPageUptodate(page); SetPageUptodate(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment