mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 08:42:10 +00:00
ocfs2: support large folios in ocfs2_write_zero_page()
Remove assumptions that a folio is PAGE_SIZE. Link: https://lkml.kernel.org/r/20241205171653.3179945-24-willy@infradead.org Signed-off-by: Mark Tinguely <mark.tinguely@oracle.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Joel Becker <jlbec@evilplan.org> Cc: Jun Piao <piaojun@huawei.com> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Mark Fasheh <mark@fasheh.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
2cb6a96674
commit
47ebe57b0b
@ -782,11 +782,11 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,
|
||||
goto out_commit_trans;
|
||||
}
|
||||
|
||||
/* Get the offsets within the page that we want to zero */
|
||||
zero_from = abs_from & (PAGE_SIZE - 1);
|
||||
zero_to = abs_to & (PAGE_SIZE - 1);
|
||||
/* Get the offsets within the folio that we want to zero */
|
||||
zero_from = offset_in_folio(folio, abs_from);
|
||||
zero_to = offset_in_folio(folio, abs_to);
|
||||
if (!zero_to)
|
||||
zero_to = PAGE_SIZE;
|
||||
zero_to = folio_size(folio);
|
||||
|
||||
trace_ocfs2_write_zero_page(
|
||||
(unsigned long long)OCFS2_I(inode)->ip_blkno,
|
||||
|
Loading…
Reference in New Issue
Block a user