mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Revert "Avoid BUG in migrate_folio_extra"
This reverts commit b052035990.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: tstabrawa <59430211+tstabrawa@users.noreply.github.com>
Closes #16568
Closes #16723
This commit is contained in:
committed by
Brian Behlendorf
parent
b96845b632
commit
ae48c2f6a9
@@ -260,15 +260,6 @@ update_pages(znode_t *zp, int64_t start, int len, objset_t *os)
|
||||
} else {
|
||||
ClearPageError(pp);
|
||||
SetPageUptodate(pp);
|
||||
if (!PagePrivate(pp)) {
|
||||
/*
|
||||
* Set private bit so page migration
|
||||
* will wait for us to finish writeback
|
||||
* before calling migrate_folio().
|
||||
*/
|
||||
SetPagePrivate(pp);
|
||||
get_page(pp);
|
||||
}
|
||||
|
||||
if (mapping_writably_mapped(mp))
|
||||
flush_dcache_page(pp);
|
||||
@@ -4090,14 +4081,6 @@ zfs_fillpage(struct inode *ip, struct page *pp)
|
||||
} else {
|
||||
ClearPageError(pp);
|
||||
SetPageUptodate(pp);
|
||||
if (!PagePrivate(pp)) {
|
||||
/*
|
||||
* Set private bit so page migration will wait for us to
|
||||
* finish writeback before calling migrate_folio().
|
||||
*/
|
||||
SetPagePrivate(pp);
|
||||
get_page(pp);
|
||||
}
|
||||
}
|
||||
|
||||
return (error);
|
||||
|
||||
@@ -1577,14 +1577,6 @@ zfs_zero_partial_page(znode_t *zp, uint64_t start, uint64_t len)
|
||||
mark_page_accessed(pp);
|
||||
SetPageUptodate(pp);
|
||||
ClearPageError(pp);
|
||||
if (!PagePrivate(pp)) {
|
||||
/*
|
||||
* Set private bit so page migration will wait for us to
|
||||
* finish writeback before calling migrate_folio().
|
||||
*/
|
||||
SetPagePrivate(pp);
|
||||
get_page(pp);
|
||||
}
|
||||
unlock_page(pp);
|
||||
put_page(pp);
|
||||
}
|
||||
|
||||
@@ -607,42 +607,6 @@ zpl_writepage(struct page *pp, struct writeback_control *wbc)
|
||||
return (zpl_putpage(pp, wbc, &for_sync));
|
||||
}
|
||||
|
||||
static int
|
||||
zpl_releasepage(struct page *pp, gfp_t gfp)
|
||||
{
|
||||
if (PagePrivate(pp)) {
|
||||
ClearPagePrivate(pp);
|
||||
put_page(pp);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
#ifdef HAVE_VFS_RELEASE_FOLIO
|
||||
static bool
|
||||
zpl_release_folio(struct folio *folio, gfp_t gfp)
|
||||
{
|
||||
return (zpl_releasepage(&folio->page, gfp));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VFS_INVALIDATE_FOLIO
|
||||
static void
|
||||
zpl_invalidate_folio(struct folio *folio, size_t offset, size_t len)
|
||||
{
|
||||
if ((offset == 0) && (len == PAGE_SIZE)) {
|
||||
zpl_releasepage(&folio->page, 0);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void
|
||||
zpl_invalidatepage(struct page *pp, unsigned int offset, unsigned int len)
|
||||
{
|
||||
if ((offset == 0) && (len == PAGE_SIZE)) {
|
||||
zpl_releasepage(pp, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The flag combination which matches the behavior of zfs_space() is
|
||||
* FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE. The FALLOC_FL_PUNCH_HOLE
|
||||
@@ -1126,16 +1090,6 @@ const struct address_space_operations zpl_address_space_operations = {
|
||||
#ifdef HAVE_VFS_FILEMAP_DIRTY_FOLIO
|
||||
.dirty_folio = filemap_dirty_folio,
|
||||
#endif
|
||||
#ifdef HAVE_VFS_RELEASE_FOLIO
|
||||
.release_folio = zpl_release_folio,
|
||||
#else
|
||||
.releasepage = zpl_releasepage,
|
||||
#endif
|
||||
#ifdef HAVE_VFS_INVALIDATE_FOLIO
|
||||
.invalidate_folio = zpl_invalidate_folio,
|
||||
#else
|
||||
.invalidatepage = zpl_invalidatepage,
|
||||
#endif
|
||||
};
|
||||
|
||||
const struct file_operations zpl_file_operations = {
|
||||
|
||||
Reference in New Issue
Block a user