diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-15 22:42:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-15 22:42:40 -0500 |
commit | 7c225c69f86c934e3be9be63ecde754e286838d7 (patch) | |
tree | ff2df419b0c4886b37407235f7d21215e4cf45e4 /fs/nilfs2/segment.c | |
parent | 6363b3f3ac5be096d08c8c504128befa0c033529 (diff) | |
parent | 1b7176aea0a924ac59c6a283129d3e8eb00aa915 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton:
- a few misc bits
- ocfs2 updates
- almost all of MM
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (131 commits)
memory hotplug: fix comments when adding section
mm: make alloc_node_mem_map a void call if we don't have CONFIG_FLAT_NODE_MEM_MAP
mm: simplify nodemask printing
mm,oom_reaper: remove pointless kthread_run() error check
mm/page_ext.c: check if page_ext is not prepared
writeback: remove unused function parameter
mm: do not rely on preempt_count in print_vma_addr
mm, sparse: do not swamp log with huge vmemmap allocation failures
mm/hmm: remove redundant variable align_end
mm/list_lru.c: mark expected switch fall-through
mm/shmem.c: mark expected switch fall-through
mm/page_alloc.c: broken deferred calculation
mm: don't warn about allocations which stall for too long
fs: fuse: account fuse_inode slab memory as reclaimable
mm, page_alloc: fix potential false positive in __zone_watermark_ok
mm: mlock: remove lru_add_drain_all()
mm, sysctl: make NUMA stats configurable
shmem: convert shmem_init_inodecache() to void
Unify migrate_pages and move_pages access checks
mm, pagevec: rename pagevec drained field
...
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 70ded52dc1dd..f65392fecb5c 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -708,21 +708,17 @@ static size_t nilfs_lookup_dirty_data_buffers(struct inode *inode, | |||
708 | index = start >> PAGE_SHIFT; | 708 | index = start >> PAGE_SHIFT; |
709 | last = end >> PAGE_SHIFT; | 709 | last = end >> PAGE_SHIFT; |
710 | } | 710 | } |
711 | pagevec_init(&pvec, 0); | 711 | pagevec_init(&pvec); |
712 | repeat: | 712 | repeat: |
713 | if (unlikely(index > last) || | 713 | if (unlikely(index > last) || |
714 | !pagevec_lookup_tag(&pvec, mapping, &index, PAGECACHE_TAG_DIRTY, | 714 | !pagevec_lookup_range_tag(&pvec, mapping, &index, last, |
715 | min_t(pgoff_t, last - index, | 715 | PAGECACHE_TAG_DIRTY)) |
716 | PAGEVEC_SIZE - 1) + 1)) | ||
717 | return ndirties; | 716 | return ndirties; |
718 | 717 | ||
719 | for (i = 0; i < pagevec_count(&pvec); i++) { | 718 | for (i = 0; i < pagevec_count(&pvec); i++) { |
720 | struct buffer_head *bh, *head; | 719 | struct buffer_head *bh, *head; |
721 | struct page *page = pvec.pages[i]; | 720 | struct page *page = pvec.pages[i]; |
722 | 721 | ||
723 | if (unlikely(page->index > last)) | ||
724 | break; | ||
725 | |||
726 | lock_page(page); | 722 | lock_page(page); |
727 | if (!page_has_buffers(page)) | 723 | if (!page_has_buffers(page)) |
728 | create_empty_buffers(page, i_blocksize(inode), 0); | 724 | create_empty_buffers(page, i_blocksize(inode), 0); |
@@ -757,10 +753,10 @@ static void nilfs_lookup_dirty_node_buffers(struct inode *inode, | |||
757 | unsigned int i; | 753 | unsigned int i; |
758 | pgoff_t index = 0; | 754 | pgoff_t index = 0; |
759 | 755 | ||
760 | pagevec_init(&pvec, 0); | 756 | pagevec_init(&pvec); |
761 | 757 | ||
762 | while (pagevec_lookup_tag(&pvec, mapping, &index, PAGECACHE_TAG_DIRTY, | 758 | while (pagevec_lookup_tag(&pvec, mapping, &index, |
763 | PAGEVEC_SIZE)) { | 759 | PAGECACHE_TAG_DIRTY)) { |
764 | for (i = 0; i < pagevec_count(&pvec); i++) { | 760 | for (i = 0; i < pagevec_count(&pvec); i++) { |
765 | bh = head = page_buffers(pvec.pages[i]); | 761 | bh = head = page_buffers(pvec.pages[i]); |
766 | do { | 762 | do { |