Re: [PATCH v4 20/25] mm/filemap: Convert wait_on_page_bit to wait_on_folio_bit
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-03-17 17:42:48
Also in:
linux-mm, lkml
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-03-17 17:42:48
Also in:
linux-mm, lkml
+ if (FolioWriteback(folio) && + wait_on_folio_bit_killable(folio, PG_writeback) < 0) return VM_FAULT_RETRY;
This really screams for a proper wait_on_page_writeback_killable helper rather than hardcoding the PG_* bit in a random file system. It also seems to have missed the conversion to a while loop in wait_on_page_writeback. Also this patch seems to be different in style to other by not for now always using page wrappers in the file systems. Not that I really care either way, but it seems inconsistent with the rest.
/* - * This is exported only for wait_on_page_locked/wait_on_page_writeback, etc., + * This is exported only for wait_on_folio_locked/wait_on_folio_writeback, etc., * and should not be used directly. */ -extern void wait_on_page_bit(struct page *page, int bit_nr); -extern int wait_on_page_bit_killable(struct page *page, int bit_nr); +extern void wait_on_folio_bit(struct folio *folio, int bit_nr); +extern int wait_on_folio_bit_killable(struct folio *folio, int bit_nr);
Well, the above code obviously ignored this comment :( Maybe an __ prefix is a bit more of hint?