mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08: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