linux/fs/hostfs
Linus Torvalds e44be00289 hostfs: fix folio conversion
Commit e3ec0fe944 ("hostfs: Convert hostfs_read_folio() to use a
folio") simplified hostfs_read_folio(), but in the process of converting
to using folios natively also mis-used the folio_zero_tail() function
due to the very confusing API of that function.

Very arguably it's folio_zero_tail() API itself that is buggy, since it
would make more sense (and the documentation kind of implies) that the
third argument would be the pointer to the beginning of the folio
buffer.

But no, the third argument to folio_zero_tail() is where we should start
zeroing the tail (even if we already also pass in the offset separately
as the second argument).

So fix the hostfs caller, and we can leave any folio_zero_tail() sanity
cleanup for later.

Reported-and-tested-by: Maciej Żenczykowski <maze@google.com>
Fixes: e3ec0fe944 ("hostfs: Convert hostfs_read_folio() to use a folio")
Link: https://lore.kernel.org/all/CANP3RGceNzwdb7w=vPf5=7BCid5HVQDmz1K5kC9JG42+HVAh_g@mail.gmail.com/
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-07-24 09:25:15 -07:00
..
hostfs_kern.c hostfs: fix folio conversion 2024-07-24 09:25:15 -07:00
hostfs_user_exp.c um: hostfs: define our own API boundary 2023-04-20 23:04:40 +02:00
hostfs_user.c hostfs: Fix ephemeral inodes 2023-06-12 21:26:19 +02:00
hostfs.h hostfs: Fix ephemeral inodes 2023-06-12 21:26:19 +02:00
Makefile um: hostfs: define our own API boundary 2023-04-20 23:04:40 +02:00