diff options
author | Matthew Wilcox <willy@infradead.org> | 2017-12-04 10:40:41 -0500 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2018-10-21 10:46:41 -0400 |
commit | ec82e1c1c89ce02d7703b841e6ee7d429feed609 (patch) | |
tree | 3be1b415d3abad6f032b0216bb303f27516ad573 /fs/buffer.c | |
parent | 0a943c65e7d7207dce2a63e9d14a925c0d9a7d96 (diff) |
fs: Convert buffer to XArray
Mostly comment fixes, but one use of __xa_set_mark.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 6f1ae3ac9789..1286c2b95498 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -562,7 +562,7 @@ void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) | |||
562 | EXPORT_SYMBOL(mark_buffer_dirty_inode); | 562 | EXPORT_SYMBOL(mark_buffer_dirty_inode); |
563 | 563 | ||
564 | /* | 564 | /* |
565 | * Mark the page dirty, and set it dirty in the radix tree, and mark the inode | 565 | * Mark the page dirty, and set it dirty in the page cache, and mark the inode |
566 | * dirty. | 566 | * dirty. |
567 | * | 567 | * |
568 | * If warn is true, then emit a warning if the page is not uptodate and has | 568 | * If warn is true, then emit a warning if the page is not uptodate and has |
@@ -579,8 +579,8 @@ void __set_page_dirty(struct page *page, struct address_space *mapping, | |||
579 | if (page->mapping) { /* Race with truncate? */ | 579 | if (page->mapping) { /* Race with truncate? */ |
580 | WARN_ON_ONCE(warn && !PageUptodate(page)); | 580 | WARN_ON_ONCE(warn && !PageUptodate(page)); |
581 | account_page_dirtied(page, mapping); | 581 | account_page_dirtied(page, mapping); |
582 | radix_tree_tag_set(&mapping->i_pages, | 582 | __xa_set_mark(&mapping->i_pages, page_index(page), |
583 | page_index(page), PAGECACHE_TAG_DIRTY); | 583 | PAGECACHE_TAG_DIRTY); |
584 | } | 584 | } |
585 | xa_unlock_irqrestore(&mapping->i_pages, flags); | 585 | xa_unlock_irqrestore(&mapping->i_pages, flags); |
586 | } | 586 | } |
@@ -1050,7 +1050,7 @@ __getblk_slow(struct block_device *bdev, sector_t block, | |||
1050 | * The relationship between dirty buffers and dirty pages: | 1050 | * The relationship between dirty buffers and dirty pages: |
1051 | * | 1051 | * |
1052 | * Whenever a page has any dirty buffers, the page's dirty bit is set, and | 1052 | * Whenever a page has any dirty buffers, the page's dirty bit is set, and |
1053 | * the page is tagged dirty in its radix tree. | 1053 | * the page is tagged dirty in the page cache. |
1054 | * | 1054 | * |
1055 | * At all times, the dirtiness of the buffers represents the dirtiness of | 1055 | * At all times, the dirtiness of the buffers represents the dirtiness of |
1056 | * subsections of the page. If the page has buffers, the page dirty bit is | 1056 | * subsections of the page. If the page has buffers, the page dirty bit is |
@@ -1073,9 +1073,9 @@ __getblk_slow(struct block_device *bdev, sector_t block, | |||
1073 | * mark_buffer_dirty - mark a buffer_head as needing writeout | 1073 | * mark_buffer_dirty - mark a buffer_head as needing writeout |
1074 | * @bh: the buffer_head to mark dirty | 1074 | * @bh: the buffer_head to mark dirty |
1075 | * | 1075 | * |
1076 | * mark_buffer_dirty() will set the dirty bit against the buffer, then set its | 1076 | * mark_buffer_dirty() will set the dirty bit against the buffer, then set |
1077 | * backing page dirty, then tag the page as dirty in its address_space's radix | 1077 | * its backing page dirty, then tag the page as dirty in the page cache |
1078 | * tree and then attach the address_space's inode to its superblock's dirty | 1078 | * and then attach the address_space's inode to its superblock's dirty |
1079 | * inode list. | 1079 | * inode list. |
1080 | * | 1080 | * |
1081 | * mark_buffer_dirty() is atomic. It takes bh->b_page->mapping->private_lock, | 1081 | * mark_buffer_dirty() is atomic. It takes bh->b_page->mapping->private_lock, |