diff options
| author | Linus Torvalds <[email protected]> | 2018-11-18 19:31:26 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-11-18 19:31:26 +0000 |
| commit | c67a98c00ea3c1fad14833f440fcd770232d24e7 (patch) | |
| tree | 8f8848b43285f36e3dada9b989d09b00127dab5e /fs/inode.c | |
| parent | Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/k... (diff) | |
| parent | mm/memblock.c: fix a typo in __next_mem_pfn_range() comments (diff) | |
| download | kernel-c67a98c00ea3c1fad14833f440fcd770232d24e7.tar.gz kernel-c67a98c00ea3c1fad14833f440fcd770232d24e7.zip | |
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
"16 fixes"
* emailed patches from Andrew Morton <[email protected]>:
mm/memblock.c: fix a typo in __next_mem_pfn_range() comments
mm, page_alloc: check for max order in hot path
scripts/spdxcheck.py: make python3 compliant
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
lib/ubsan.c: don't mark __ubsan_handle_builtin_unreachable as noreturn
mm/vmstat.c: fix NUMA statistics updates
mm/gup.c: fix follow_page_mask() kerneldoc comment
ocfs2: free up write context when direct IO failed
scripts/faddr2line: fix location of start_kernel in comment
mm: don't reclaim inodes with many attached pages
mm, memory_hotplug: check zone_movable in has_unmovable_pages
mm/swapfile.c: use kvzalloc for swap_info_struct allocation
MAINTAINERS: update OMAP MMC entry
hugetlbfs: fix kernel BUG at fs/hugetlbfs/inode.c:444!
kernel/sched/psi.c: simplify cgroup_move_task()
z3fold: fix possible reclaim races
Diffstat (limited to 'fs/inode.c')
| -rw-r--r-- | fs/inode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/inode.c b/fs/inode.c index 9e198f00b64c..35d2108d567c 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -730,8 +730,11 @@ static enum lru_status inode_lru_isolate(struct list_head *item, return LRU_REMOVED; } - /* recently referenced inodes get one more pass */ - if (inode->i_state & I_REFERENCED) { + /* + * Recently referenced inodes and inodes with many attached pages + * get one more pass. + */ + if (inode->i_state & I_REFERENCED || inode->i_data.nrpages > 1) { inode->i_state &= ~I_REFERENCED; spin_unlock(&inode->i_lock); return LRU_ROTATE; |
