mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-19 05:24:11 +00:00
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@infradead.org Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Acked-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Cc: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Dave Chinner <david@fromorbit.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d339d705f7
commit
f82b376413
3 changed files with 5 additions and 14 deletions
|
@ -594,7 +594,7 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode);
|
||||||
*
|
*
|
||||||
* The caller must hold lock_page_memcg().
|
* 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)
|
int warn)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -608,6 +608,7 @@ static void __set_page_dirty(struct page *page, struct address_space *mapping,
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&mapping->tree_lock, flags);
|
spin_unlock_irqrestore(&mapping->tree_lock, flags);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(__set_page_dirty);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a page to the dirty page list.
|
* Add a page to the dirty page list.
|
||||||
|
|
|
@ -1467,19 +1467,8 @@ xfs_vm_set_page_dirty(
|
||||||
newly_dirty = !TestSetPageDirty(page);
|
newly_dirty = !TestSetPageDirty(page);
|
||||||
spin_unlock(&mapping->private_lock);
|
spin_unlock(&mapping->private_lock);
|
||||||
|
|
||||||
if (newly_dirty) {
|
if (newly_dirty)
|
||||||
/* sigh - __set_page_dirty() is static, so copy it here, too */
|
__set_page_dirty(page, mapping, 1);
|
||||||
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);
|
|
||||||
}
|
|
||||||
unlock_page_memcg(page);
|
unlock_page_memcg(page);
|
||||||
if (newly_dirty)
|
if (newly_dirty)
|
||||||
__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
|
__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
|
||||||
|
|
|
@ -1466,6 +1466,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
|
||||||
extern void do_invalidatepage(struct page *page, unsigned int offset,
|
extern void do_invalidatepage(struct page *page, unsigned int offset,
|
||||||
unsigned int length);
|
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_nobuffers(struct page *page);
|
||||||
int __set_page_dirty_no_writeback(struct page *page);
|
int __set_page_dirty_no_writeback(struct page *page);
|
||||||
int redirty_page_for_writepage(struct writeback_control *wbc,
|
int redirty_page_for_writepage(struct writeback_control *wbc,
|
||||||
|
|
Loading…
Add table
Reference in a new issue