]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fuse: fix direct io folio offset and length calculation
authorJoanne Koong <joannelkoong@gmail.com>
Wed, 11 Dec 2024 20:55:56 +0000 (12:55 -0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 12 Dec 2024 08:27:42 +0000 (09:27 +0100)
commit7a4f541873734f41f9645ec147cfae72ef3ffd00
treea4ed04037b09c23b90d8fef54bb854c3a148150c
parent40384c840ea1944d7c5a392e8975ed088ecf0b37
fuse: fix direct io folio offset and length calculation

For the direct io case, the pages from userspace may be part of a huge
folio, even if all folios in the page cache for fuse are small.

Fix the logic for calculating the offset and length of the folio for
the direct io case, which currently incorrectly assumes that all folios
encountered are one page size.

Fixes: 3b97c3652d91 ("fuse: convert direct io to use folios")
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c