diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-03 15:12:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-03 15:13:43 -0700 |
commit | 2e4f8c729db5f3c0b8ea8b1b99f1ae124152e8cc (patch) | |
tree | 5aa8c04847bb7a6ed4252185a9fee0bb6f059990 | |
parent | 353767e4aaeb7bc818273dfacbb01dd36a9db47a (diff) | |
parent | 5abbb7b92820cf6ba9154a35cff6d64b62d7f273 (diff) | |
download | lwn-2e4f8c729db5f3c0b8ea8b1b99f1ae124152e8cc.tar.gz lwn-2e4f8c729db5f3c0b8ea8b1b99f1ae124152e8cc.zip |
Merge tag 'affs-5.20-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull affs fix from David Sterba:
"One update to AFFS, switching away from the kmap/kmap_atomic API"
* tag 'affs-5.20-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
affs: use memcpy_to_page and remove replace kmap_atomic()
-rw-r--r-- | fs/affs/file.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c index cd00a4c68a12..cefa222f7881 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c @@ -526,7 +526,6 @@ affs_do_readpage_ofs(struct page *page, unsigned to, int create) struct inode *inode = page->mapping->host; struct super_block *sb = inode->i_sb; struct buffer_head *bh; - char *data; unsigned pos = 0; u32 bidx, boff, bsize; u32 tmp; @@ -545,15 +544,12 @@ affs_do_readpage_ofs(struct page *page, unsigned to, int create) return PTR_ERR(bh); tmp = min(bsize - boff, to - pos); BUG_ON(pos + tmp > to || tmp > bsize); - data = kmap_atomic(page); - memcpy(data + pos, AFFS_DATA(bh) + boff, tmp); - kunmap_atomic(data); + memcpy_to_page(page, pos, AFFS_DATA(bh) + boff, tmp); affs_brelse(bh); bidx++; pos += tmp; boff = 0; } - flush_dcache_page(page); return 0; } |