Skip to content

Commit

Permalink
mm/filemap.c: remove useless check in pagecache_get_page()
Browse files Browse the repository at this point in the history
page always is not NULL, so we may remove this useless check.

Link: http://lkml.kernel.org/r/154419752044.18559.2452963074922917720.stgit@localhost.localdomain
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Kirill Tkhai authored and Linus Torvalds committed Dec 28, 2018
1 parent 144552f commit c16eb00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset,
VM_BUG_ON_PAGE(page->index != offset, page);
}

if (page && (fgp_flags & FGP_ACCESSED))
if (fgp_flags & FGP_ACCESSED)
mark_page_accessed(page);

no_page:
Expand Down

0 comments on commit c16eb00

Please sign in to comment.