Commit 524b2c6d authored by Christian Brauner's avatar Christian Brauner

romfs: fix romfs_read_folio()

Add the correct offset to folio_zero_tail().

Fixes: d86f2de0 ("romfs: Convert romfs_read_folio() to use a folio")
Reported-by: default avatarGreg Ungerer <gregungerer@westnet.com.au>
Link: https://lore.kernel.org/r/Zr0GTnPHfeA0P8nb@casper.infradead.orgSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 92764e88
......@@ -126,7 +126,7 @@ static int romfs_read_folio(struct file *file, struct folio *folio)
}
}
buf = folio_zero_tail(folio, fillsize, buf);
buf = folio_zero_tail(folio, fillsize, buf + fillsize);
kunmap_local(buf);
folio_end_read(folio, ret == 0);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment