diff options
author | Cong Wang <amwang@redhat.com> | 2011-11-25 10:14:30 -0500 |
---|---|---|
committer | Cong Wang <xiyou.wangcong@gmail.com> | 2012-03-20 09:48:23 -0400 |
commit | d93492855ff307ce9d699e36d966af3420b80bb3 (patch) | |
tree | 796d1ab910796675960c780d128477cf97b9a4bb | |
parent | 2408f6ef6bf58620f8330b37181d2bdca2e7c7c5 (diff) |
gfs2: remove the second argument of k[un]map_atomic()
Signed-off-by: Cong Wang <amwang@redhat.com>
-rw-r--r-- | fs/gfs2/aops.c | 12 | ||||
-rw-r--r-- | fs/gfs2/lops.c | 8 | ||||
-rw-r--r-- | fs/gfs2/quota.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 501e5cba09b3..38b7a74a0f91 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
@@ -434,12 +434,12 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) | |||
434 | if (error) | 434 | if (error) |
435 | return error; | 435 | return error; |
436 | 436 | ||
437 | kaddr = kmap_atomic(page, KM_USER0); | 437 | kaddr = kmap_atomic(page); |
438 | if (dsize > (dibh->b_size - sizeof(struct gfs2_dinode))) | 438 | if (dsize > (dibh->b_size - sizeof(struct gfs2_dinode))) |
439 | dsize = (dibh->b_size - sizeof(struct gfs2_dinode)); | 439 | dsize = (dibh->b_size - sizeof(struct gfs2_dinode)); |
440 | memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize); | 440 | memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize); |
441 | memset(kaddr + dsize, 0, PAGE_CACHE_SIZE - dsize); | 441 | memset(kaddr + dsize, 0, PAGE_CACHE_SIZE - dsize); |
442 | kunmap_atomic(kaddr, KM_USER0); | 442 | kunmap_atomic(kaddr); |
443 | flush_dcache_page(page); | 443 | flush_dcache_page(page); |
444 | brelse(dibh); | 444 | brelse(dibh); |
445 | SetPageUptodate(page); | 445 | SetPageUptodate(page); |
@@ -542,9 +542,9 @@ int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state, | |||
542 | page = read_cache_page(mapping, index, __gfs2_readpage, NULL); | 542 | page = read_cache_page(mapping, index, __gfs2_readpage, NULL); |
543 | if (IS_ERR(page)) | 543 | if (IS_ERR(page)) |
544 | return PTR_ERR(page); | 544 | return PTR_ERR(page); |
545 | p = kmap_atomic(page, KM_USER0); | 545 | p = kmap_atomic(page); |
546 | memcpy(buf + copied, p + offset, amt); | 546 | memcpy(buf + copied, p + offset, amt); |
547 | kunmap_atomic(p, KM_USER0); | 547 | kunmap_atomic(p); |
548 | mark_page_accessed(page); | 548 | mark_page_accessed(page); |
549 | page_cache_release(page); | 549 | page_cache_release(page); |
550 | copied += amt; | 550 | copied += amt; |
@@ -788,11 +788,11 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh, | |||
788 | unsigned char *buf = dibh->b_data + sizeof(struct gfs2_dinode); | 788 | unsigned char *buf = dibh->b_data + sizeof(struct gfs2_dinode); |
789 | 789 | ||
790 | BUG_ON((pos + len) > (dibh->b_size - sizeof(struct gfs2_dinode))); | 790 | BUG_ON((pos + len) > (dibh->b_size - sizeof(struct gfs2_dinode))); |
791 | kaddr = kmap_atomic(page, KM_USER0); | 791 | kaddr = kmap_atomic(page); |
792 | memcpy(buf + pos, kaddr + pos, copied); | 792 | memcpy(buf + pos, kaddr + pos, copied); |
793 | memset(kaddr + pos + copied, 0, len - copied); | 793 | memset(kaddr + pos + copied, 0, len - copied); |
794 | flush_dcache_page(page); | 794 | flush_dcache_page(page); |
795 | kunmap_atomic(kaddr, KM_USER0); | 795 | kunmap_atomic(kaddr); |
796 | 796 | ||
797 | if (!PageUptodate(page)) | 797 | if (!PageUptodate(page)) |
798 | SetPageUptodate(page); | 798 | SetPageUptodate(page); |
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 0301be655b12..df7c6e8d0764 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -553,11 +553,11 @@ static void gfs2_check_magic(struct buffer_head *bh) | |||
553 | __be32 *ptr; | 553 | __be32 *ptr; |
554 | 554 | ||
555 | clear_buffer_escaped(bh); | 555 | clear_buffer_escaped(bh); |
556 | kaddr = kmap_atomic(bh->b_page, KM_USER0); | 556 | kaddr = kmap_atomic(bh->b_page); |
557 | ptr = kaddr + bh_offset(bh); | 557 | ptr = kaddr + bh_offset(bh); |
558 | if (*ptr == cpu_to_be32(GFS2_MAGIC)) | 558 | if (*ptr == cpu_to_be32(GFS2_MAGIC)) |
559 | set_buffer_escaped(bh); | 559 | set_buffer_escaped(bh); |
560 | kunmap_atomic(kaddr, KM_USER0); | 560 | kunmap_atomic(kaddr); |
561 | } | 561 | } |
562 | 562 | ||
563 | static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh, | 563 | static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh, |
@@ -594,10 +594,10 @@ static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh, | |||
594 | if (buffer_escaped(bd->bd_bh)) { | 594 | if (buffer_escaped(bd->bd_bh)) { |
595 | void *kaddr; | 595 | void *kaddr; |
596 | bh1 = gfs2_log_get_buf(sdp); | 596 | bh1 = gfs2_log_get_buf(sdp); |
597 | kaddr = kmap_atomic(bd->bd_bh->b_page, KM_USER0); | 597 | kaddr = kmap_atomic(bd->bd_bh->b_page); |
598 | memcpy(bh1->b_data, kaddr + bh_offset(bd->bd_bh), | 598 | memcpy(bh1->b_data, kaddr + bh_offset(bd->bd_bh), |
599 | bh1->b_size); | 599 | bh1->b_size); |
600 | kunmap_atomic(kaddr, KM_USER0); | 600 | kunmap_atomic(kaddr); |
601 | *(__be32 *)bh1->b_data = 0; | 601 | *(__be32 *)bh1->b_data = 0; |
602 | clear_buffer_escaped(bd->bd_bh); | 602 | clear_buffer_escaped(bd->bd_bh); |
603 | unlock_buffer(bd->bd_bh); | 603 | unlock_buffer(bd->bd_bh); |
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index a45b21b03915..c0f8904f0860 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -720,12 +720,12 @@ get_a_page: | |||
720 | 720 | ||
721 | gfs2_trans_add_bh(ip->i_gl, bh, 0); | 721 | gfs2_trans_add_bh(ip->i_gl, bh, 0); |
722 | 722 | ||
723 | kaddr = kmap_atomic(page, KM_USER0); | 723 | kaddr = kmap_atomic(page); |
724 | if (offset + sizeof(struct gfs2_quota) > PAGE_CACHE_SIZE) | 724 | if (offset + sizeof(struct gfs2_quota) > PAGE_CACHE_SIZE) |
725 | nbytes = PAGE_CACHE_SIZE - offset; | 725 | nbytes = PAGE_CACHE_SIZE - offset; |
726 | memcpy(kaddr + offset, ptr, nbytes); | 726 | memcpy(kaddr + offset, ptr, nbytes); |
727 | flush_dcache_page(page); | 727 | flush_dcache_page(page); |
728 | kunmap_atomic(kaddr, KM_USER0); | 728 | kunmap_atomic(kaddr); |
729 | unlock_page(page); | 729 | unlock_page(page); |
730 | page_cache_release(page); | 730 | page_cache_release(page); |
731 | 731 | ||