From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: akpm@linux-foundation.org, gorcunov@virtuozzo.com,
ktkhai@virtuozzo.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] mm: Remove useless check in pagecache_get_page()
Date: Fri, 07 Dec 2018 18:46:24 +0300 [thread overview]
Message-ID: <154419752044.18559.2452963074922917720.stgit@localhost.localdomain> (raw)
page always is not NULL, so we may remove this useless check.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index b1165a311a1f..5da9ce090898 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -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:
next reply other threads:[~2018-12-07 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 15:46 Kirill Tkhai [this message]
2018-12-07 17:04 ` [PATCH] mm: Remove useless check in pagecache_get_page() Kirill Gorkunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=154419752044.18559.2452963074922917720.stgit@localhost.localdomain \
--to=ktkhai@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=gorcunov@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).