Skip to content

Commit

Permalink
ntfs: use find_get_page_flags() to mark page accessed as it is no lon…
Browse files Browse the repository at this point in the history
…ger marked later on

Mel Gorman's commit 2457aec ("mm: non-atomically mark page accessed
during page cache allocation where possible") removed mark_page_accessed()
calls from NTFS without updating the matching find_lock_page() to
find_get_page_flags(GFP_LOCK | FGP_ACCESSED) thus causing the page to
never be marked accessed.

This patch fixes that.

Signed-off-by: Anton Altaparmakov <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AntonAltaparmakov authored and torvalds committed Oct 10, 2014
1 parent 2f82df0 commit 5272d03
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fs/ntfs/file.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* file.c - NTFS kernel file operations. Part of the Linux-NTFS project.
*
* Copyright (c) 2001-2011 Anton Altaparmakov and Tuxera Inc.
* Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@ -410,7 +410,8 @@ static inline int __ntfs_grab_cache_pages(struct address_space *mapping,
BUG_ON(!nr_pages);
err = nr = 0;
do {
pages[nr] = find_lock_page(mapping, index);
pages[nr] = find_get_page_flags(mapping, index, FGP_LOCK |
FGP_ACCESSED);
if (!pages[nr]) {
if (!*cached_page) {
*cached_page = page_cache_alloc(mapping);
2 changes: 1 addition & 1 deletion fs/ntfs/super.c
Original file line number Diff line number Diff line change
@@ -3208,7 +3208,7 @@ static void __exit exit_ntfs_fs(void)
}

MODULE_AUTHOR("Anton Altaparmakov <[email protected]>");
MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2011 Anton Altaparmakov and Tuxera Inc.");
MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.");
MODULE_VERSION(NTFS_VERSION);
MODULE_LICENSE("GPL");
#ifdef DEBUG

0 comments on commit 5272d03

Please sign in to comment.