diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2023-06-27 15:34:36 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2023-07-03 22:30:48 +0200 |
commit | d68d0c6c3fc781c8a130e6a4d0666dbbd69e917b (patch) | |
tree | f284d052d5c95e8dba1399f94db1283fcface860 /fs/gfs2/quota.c | |
parent | gfs2: Convert remaining kmap_atomic calls to kmap_local_page (diff) | |
download | linux-d68d0c6c3fc781c8a130e6a4d0666dbbd69e917b.tar.xz linux-d68d0c6c3fc781c8a130e6a4d0666dbbd69e917b.zip |
gfs2: Use memcpy_{from,to}_page where appropriate
Replace kmap_local_page() + memcpy() + kunmap_local() sequences with
memcpy_{from,to}_page() where we are not doing anything else with the
mapped page.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/gfs2/quota.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 42a3f1e6b553..7765346e3617 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -712,7 +712,6 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, struct address_space *mapping = inode->i_mapping; struct page *page; struct buffer_head *bh; - void *kaddr; u64 blk; unsigned bsize = sdp->sd_sb.sb_bsize, bnum = 0, boff = 0; unsigned to_write = bytes, pg_off = off; @@ -764,9 +763,7 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, } /* Write to the page, now that we have setup the buffer(s) */ - kaddr = kmap_local_page(page); - memcpy(kaddr + off, buf, bytes); - kunmap_local(kaddr); + memcpy_to_page(page, off, buf, bytes); flush_dcache_page(page); unlock_page(page); put_page(page); |