mm/filemap.c: remove useless check in pagecache_get_page()
authorKirill Tkhai <[email protected]>
Fri, 28 Dec 2018 08:37:35 +0000 (00:37 -0800)
committerLinus Torvalds <[email protected]>
Fri, 28 Dec 2018 20:11:50 +0000 (12:11 -0800)
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 <[email protected]>
Acked-by: Cyrill Gorcunov <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/filemap.c

index d2df272152f5358a5d3e62b5290d7be1a68a4336..8cec52968e834fb5c01bb7b81b162894ed389129 100644 (file)
@@ -1601,7 +1601,7 @@ repeat:
                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: