diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2015-01-22 12:09:47 -0500 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-27 19:39:48 +0200 |
| commit | 427d2c964d5a609647350a1c3eed6cadf1d53e53 (patch) | |
| tree | 6fc87f7e28e87ed7239c84e9cf8b76ce4e0fa337 /mm/filemap.c | |
| parent | 244ce5462adda80c97a9b3f4c055fffca5c71276 (diff) | |
mm: add find_get_page_flags() for 3.18 ext4 backport
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'mm/filemap.c')
| -rw-r--r-- | mm/filemap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 977b53167..b50d511c1 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -716,7 +716,8 @@ int __lock_page_or_retry(struct page *page, struct mm_struct *mm, * Is there a pagecache struct page at the given (mapping, offset) tuple? * If yes, increment its refcount and return it; if no, return NULL. */ -struct page *find_get_page(struct address_space *mapping, pgoff_t offset) +struct page *find_get_page_flags(struct address_space *mapping, pgoff_t offset, + int fgp_flags) { void **pagep; struct page *page; @@ -753,6 +754,8 @@ repeat: } } out: + if (page && (fgp_flags & FGP_ACCESSED)) + mark_page_accessed(page); rcu_read_unlock(); return page; |
