mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
ext4: Use folio_invalidate()
Instead of calling ->invalidatepage directly, use folio_invalidate(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs Tested-by: David Howells <dhowells@redhat.com> # afs
This commit is contained in:
parent
a628304ebe
commit
020df9baea
@ -1971,6 +1971,7 @@ out_no_pagelock:
|
|||||||
static int ext4_writepage(struct page *page,
|
static int ext4_writepage(struct page *page,
|
||||||
struct writeback_control *wbc)
|
struct writeback_control *wbc)
|
||||||
{
|
{
|
||||||
|
struct folio *folio = page_folio(page);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
loff_t size;
|
loff_t size;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
@ -1980,8 +1981,8 @@ static int ext4_writepage(struct page *page,
|
|||||||
bool keep_towrite = false;
|
bool keep_towrite = false;
|
||||||
|
|
||||||
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
|
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
|
||||||
inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
|
folio_invalidate(folio, 0, folio_size(folio));
|
||||||
unlock_page(page);
|
folio_unlock(folio);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user