diff options
author | Russell Cattelan <cattelan@redhat.com> | 2006-10-12 09:23:41 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-12 17:11:13 -0400 |
commit | c312c4fdc88514dd9522b7858eb879e610aeb9b1 (patch) | |
tree | ab63777ca2eaafc9b46ce347bef1488c38794296 | |
parent | fe1a698ffef5af546dd4a8cd6a1f2f202491c4ef (diff) |
[GFS2] Pass the correct value to kunmap_atomic
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>
-rw-r--r-- | fs/gfs2/lops.c | 4 | ||||
-rw-r--r-- | fs/gfs2/ops_address.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 881e337b6a7..ab6d1115f95 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -492,7 +492,7 @@ static int gfs2_check_magic(struct buffer_head *bh) | |||
492 | ptr = kaddr + bh_offset(bh); | 492 | ptr = kaddr + bh_offset(bh); |
493 | if (*ptr == cpu_to_be32(GFS2_MAGIC)) | 493 | if (*ptr == cpu_to_be32(GFS2_MAGIC)) |
494 | rv = 1; | 494 | rv = 1; |
495 | kunmap_atomic(page, KM_USER0); | 495 | kunmap_atomic(kaddr, KM_USER0); |
496 | 496 | ||
497 | return rv; | 497 | return rv; |
498 | } | 498 | } |
@@ -626,7 +626,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) | |||
626 | memcpy(bh->b_data, | 626 | memcpy(bh->b_data, |
627 | kaddr + bh_offset(bd2->bd_bh), | 627 | kaddr + bh_offset(bd2->bd_bh), |
628 | sdp->sd_sb.sb_bsize); | 628 | sdp->sd_sb.sb_bsize); |
629 | kunmap_atomic(page, KM_USER0); | 629 | kunmap_atomic(kaddr, KM_USER0); |
630 | *(__be32 *)bh->b_data = 0; | 630 | *(__be32 *)bh->b_data = 0; |
631 | } else { | 631 | } else { |
632 | bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); | 632 | bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); |
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 99c933762eb..e0599fed99c 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c | |||
@@ -162,7 +162,7 @@ static int zero_readpage(struct page *page) | |||
162 | 162 | ||
163 | kaddr = kmap_atomic(page, KM_USER0); | 163 | kaddr = kmap_atomic(page, KM_USER0); |
164 | memset(kaddr, 0, PAGE_CACHE_SIZE); | 164 | memset(kaddr, 0, PAGE_CACHE_SIZE); |
165 | kunmap_atomic(page, KM_USER0); | 165 | kunmap_atomic(kaddr, KM_USER0); |
166 | 166 | ||
167 | SetPageUptodate(page); | 167 | SetPageUptodate(page); |
168 | 168 | ||
@@ -195,7 +195,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) | |||
195 | memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), | 195 | memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), |
196 | ip->i_di.di_size); | 196 | ip->i_di.di_size); |
197 | memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - ip->i_di.di_size); | 197 | memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - ip->i_di.di_size); |
198 | kunmap_atomic(page, KM_USER0); | 198 | kunmap_atomic(kaddr, KM_USER0); |
199 | 199 | ||
200 | brelse(dibh); | 200 | brelse(dibh); |
201 | 201 | ||
@@ -485,7 +485,7 @@ static int gfs2_commit_write(struct file *file, struct page *page, | |||
485 | kaddr = kmap_atomic(page, KM_USER0); | 485 | kaddr = kmap_atomic(page, KM_USER0); |
486 | memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from, | 486 | memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from, |
487 | kaddr + from, to - from); | 487 | kaddr + from, to - from); |
488 | kunmap_atomic(page, KM_USER0); | 488 | kunmap_atomic(kaddr, KM_USER0); |
489 | 489 | ||
490 | SetPageUptodate(page); | 490 | SetPageUptodate(page); |
491 | 491 | ||