The patch titled Subject: export __set_page_dirty has been added to the -mm tree. Its filename is export-__set_page_dirty.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/export-__set_page_dirty.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/export-__set_page_dirty.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> Subject: export __set_page_dirty XFS currently contains a copy-and-paste of __set_page_dirty(). Export it from buffer.c instead. Link: http://lkml.kernel.org/r/20180313132639.17387-6-willy@xxxxxxxxxxxxx Signed-off-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> Acked-by: Jeff Layton <jlayton@xxxxxxxxxx> Cc: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx> Cc: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Cc: Dave Chinner <david@xxxxxxxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/buffer.c | 3 ++- fs/xfs/xfs_aops.c | 15 ++------------- include/linux/mm.h | 1 + 3 files changed, 5 insertions(+), 14 deletions(-) diff -puN fs/buffer.c~export-__set_page_dirty fs/buffer.c --- a/fs/buffer.c~export-__set_page_dirty +++ a/fs/buffer.c @@ -594,7 +594,7 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode); * * The caller must hold lock_page_memcg(). */ -static void __set_page_dirty(struct page *page, struct address_space *mapping, +void __set_page_dirty(struct page *page, struct address_space *mapping, int warn) { unsigned long flags; @@ -608,6 +608,7 @@ static void __set_page_dirty(struct page } spin_unlock_irqrestore(&mapping->tree_lock, flags); } +EXPORT_SYMBOL_GPL(__set_page_dirty); /* * Add a page to the dirty page list. diff -puN fs/xfs/xfs_aops.c~export-__set_page_dirty fs/xfs/xfs_aops.c --- a/fs/xfs/xfs_aops.c~export-__set_page_dirty +++ a/fs/xfs/xfs_aops.c @@ -1472,19 +1472,8 @@ xfs_vm_set_page_dirty( newly_dirty = !TestSetPageDirty(page); spin_unlock(&mapping->private_lock); - if (newly_dirty) { - /* sigh - __set_page_dirty() is static, so copy it here, too */ - unsigned long flags; - - spin_lock_irqsave(&mapping->tree_lock, flags); - if (page->mapping) { /* Race with truncate? */ - WARN_ON_ONCE(!PageUptodate(page)); - account_page_dirtied(page, mapping); - radix_tree_tag_set(&mapping->page_tree, - page_index(page), PAGECACHE_TAG_DIRTY); - } - spin_unlock_irqrestore(&mapping->tree_lock, flags); - } + if (newly_dirty) + __set_page_dirty(page, mapping, 1); unlock_page_memcg(page); if (newly_dirty) __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); diff -puN include/linux/mm.h~export-__set_page_dirty include/linux/mm.h --- a/include/linux/mm.h~export-__set_page_dirty +++ a/include/linux/mm.h @@ -1459,6 +1459,7 @@ extern int try_to_release_page(struct pa extern void do_invalidatepage(struct page *page, unsigned int offset, unsigned int length); +void __set_page_dirty(struct page *, struct address_space *, int warn); int __set_page_dirty_nobuffers(struct page *page); int __set_page_dirty_no_writeback(struct page *page); int redirty_page_for_writepage(struct writeback_control *wbc, _ Patches currently in -mm which might be from mawilcox@xxxxxxxxxxxxx are radix-tree-use-gfp_zonemask-bits-of-gfp_t-for-flags.patch arm64-turn-flush_dcache_mmap_lock-into-a-no-op.patch unicore32-turn-flush_dcache_mmap_lock-into-a-no-op.patch export-__set_page_dirty.patch fscache-use-appropriate-radix-tree-accessors.patch xarray-add-the-xa_lock-to-the-radix_tree_root.patch page-cache-use-xa_lock.patch autofs4-use-wait_event_killable.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html