mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
romfs: fix romfs_read_folio()
Add the correct offset to folio_zero_tail().
Fixes: d86f2de026
("romfs: Convert romfs_read_folio() to use a folio")
Reported-by: Greg Ungerer <gregungerer@westnet.com.au>
Link: https://lore.kernel.org/r/Zr0GTnPHfeA0P8nb@casper.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
92764e8822
commit
524b2c6dc8
@ -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);
|
kunmap_local(buf);
|
||||||
folio_end_read(folio, ret == 0);
|
folio_end_read(folio, ret == 0);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user