summaryrefslogtreecommitdiffstats
path: root/fs/afs/write.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 22:42:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 22:42:40 -0500
commit7c225c69f86c934e3be9be63ecde754e286838d7 (patch)
treeff2df419b0c4886b37407235f7d21215e4cf45e4 /fs/afs/write.c
parent6363b3f3ac5be096d08c8c504128befa0c033529 (diff)
parent1b7176aea0a924ac59c6a283129d3e8eb00aa915 (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/afs/write.c')
-rw-r--r--fs/afs/write.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 106e43db1115..11dd0526b96b 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -308,7 +308,7 @@ static void afs_kill_pages(struct afs_vnode *vnode, bool error,
308 _enter("{%x:%u},%lx-%lx", 308 _enter("{%x:%u},%lx-%lx",
309 vnode->fid.vid, vnode->fid.vnode, first, last); 309 vnode->fid.vid, vnode->fid.vnode, first, last);
310 310
311 pagevec_init(&pv, 0); 311 pagevec_init(&pv);
312 312
313 do { 313 do {
314 _debug("kill %lx-%lx", first, last); 314 _debug("kill %lx-%lx", first, last);
@@ -497,20 +497,13 @@ static int afs_writepages_region(struct address_space *mapping,
497 _enter(",,%lx,%lx,", index, end); 497 _enter(",,%lx,%lx,", index, end);
498 498
499 do { 499 do {
500 n = find_get_pages_tag(mapping, &index, PAGECACHE_TAG_DIRTY, 500 n = find_get_pages_range_tag(mapping, &index, end,
501 1, &page); 501 PAGECACHE_TAG_DIRTY, 1, &page);
502 if (!n) 502 if (!n)
503 break; 503 break;
504 504
505 _debug("wback %lx", page->index); 505 _debug("wback %lx", page->index);
506 506
507 if (page->index > end) {
508 *_next = index;
509 put_page(page);
510 _leave(" = 0 [%lx]", *_next);
511 return 0;
512 }
513
514 /* at this point we hold neither mapping->tree_lock nor lock on 507 /* at this point we hold neither mapping->tree_lock nor lock on
515 * the page itself: the page may be truncated or invalidated 508 * the page itself: the page may be truncated or invalidated
516 * (changing page->mapping to NULL), or even swizzled back from 509 * (changing page->mapping to NULL), or even swizzled back from
@@ -609,7 +602,7 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
609 602
610 ASSERT(wb != NULL); 603 ASSERT(wb != NULL);
611 604
612 pagevec_init(&pv, 0); 605 pagevec_init(&pv);
613 606
614 do { 607 do {
615 _debug("done %lx-%lx", first, last); 608 _debug("done %lx-%lx", first, last);