mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
ocfs2: convert ocfs2_write_failure() to use a folio
Remove the folio->page conversion and just use the folio. Link: https://lkml.kernel.org/r/20241205171653.3179945-11-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
7e119cff9d
commit
ecee61651d
|
|
@ -930,20 +930,19 @@ static void ocfs2_write_failure(struct inode *inode,
|
|||
int i;
|
||||
unsigned from = user_pos & (PAGE_SIZE - 1),
|
||||
to = user_pos + user_len;
|
||||
struct page *tmppage;
|
||||
|
||||
if (wc->w_target_folio)
|
||||
ocfs2_zero_new_buffers(wc->w_target_folio, from, to);
|
||||
|
||||
for (i = 0; i < wc->w_num_folios; i++) {
|
||||
tmppage = &wc->w_folios[i]->page;
|
||||
struct folio *folio = wc->w_folios[i];
|
||||
|
||||
if (tmppage && page_has_buffers(tmppage)) {
|
||||
if (folio && folio_buffers(folio)) {
|
||||
if (ocfs2_should_order_data(inode))
|
||||
ocfs2_jbd2_inode_add_write(wc->w_handle, inode,
|
||||
user_pos, user_len);
|
||||
|
||||
block_commit_write(tmppage, from, to);
|
||||
block_commit_write(&folio->page, from, to);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user