diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-25 04:27:55 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-25 04:27:55 +0100 |
commit | 489fa31ea873282b41046d412ec741f93946fc2d (patch) | |
tree | 848c68189754fdb52b6b37b67f4b1f312513d918 /fs/cramfs | |
parent | Merge branch 'work.namespace' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | nsfs: repair kernel-doc for ns_match() (diff) | |
download | linux-489fa31ea873282b41046d412ec741f93946fc2d.tar.xz linux-489fa31ea873282b41046d412ec741f93946fc2d.zip |
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro:
"Assorted stuff that didn't fit anywhere else"
* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
nsfs: repair kernel-doc for ns_match()
nsfs: add compat ioctl handler
fs/cramfs: Convert kmap() to kmap_local_data()
Diffstat (limited to 'fs/cramfs')
-rw-r--r-- | fs/cramfs/inode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 45a65c400bd0..e3d168911dbe 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -238,8 +238,7 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset, struct page *page = pages[i]; if (page) { - memcpy(data, kmap(page), PAGE_SIZE); - kunmap(page); + memcpy_from_page(data, page, 0, PAGE_SIZE); put_page(page); } else memset(data, 0, PAGE_SIZE); @@ -815,7 +814,7 @@ static int cramfs_read_folio(struct file *file, struct folio *folio) maxblock = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; bytes_filled = 0; - pgdata = kmap(page); + pgdata = kmap_local_page(page); if (page->index < maxblock) { struct super_block *sb = inode->i_sb; @@ -903,13 +902,13 @@ static int cramfs_read_folio(struct file *file, struct folio *folio) memset(pgdata + bytes_filled, 0, PAGE_SIZE - bytes_filled); flush_dcache_page(page); - kunmap(page); + kunmap_local(pgdata); SetPageUptodate(page); unlock_page(page); return 0; err: - kunmap(page); + kunmap_local(pgdata); ClearPageUptodate(page); SetPageError(page); unlock_page(page); |