On Thu, Aug 27, 2020 at 09:34:44AM +0800, Yafang Shao wrote:
quoted hunk ↗ jump to hunk
@@ -1500,9 +1500,9 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
/*
* Given that we do not allow direct reclaim to call us, we should
- * never be called in a recursive filesystem reclaim context.
+ * never be called while in a filesystem transaction.
*/
- if (WARN_ON_ONCE(current->flags & PF_MEMALLOC_NOFS))
+ if (WARN_ON_ONCE(wbc->fstrans_recursion))
goto redirty;
Erm, Dave said:
I think we should just remove
the check completely from iomap_writepage() and move it up into
xfs_vm_writepage() and xfs_vm_writepages().
ie everywhere you set this new bit, just check current->journal_info.