From: Andrew Morton Date: Tue, 12 Nov 2013 23:07:09 +0000 (-0800) Subject: mm/readahead.c:do_readhead(): don't check for ->readpage X-Git-Tag: firefly_0821_release~176^2~4993^2~246 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=63d0f0a3c7e1;p=firefly-linux-kernel-4.4.55.git mm/readahead.c:do_readhead(): don't check for ->readpage The callee force_page_cache_readahead() already does this and unlike do_readahead(), force_page_cache_readahead() remembers to check for ->readpages() as well. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/readahead.c b/mm/readahead.c index e4ed04149785..50241836fe82 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -569,7 +569,7 @@ static ssize_t do_readahead(struct address_space *mapping, struct file *filp, pgoff_t index, unsigned long nr) { - if (!mapping || !mapping->a_ops || !mapping->a_ops->readpage) + if (!mapping || !mapping->a_ops) return -EINVAL; force_page_cache_readahead(mapping, filp, index, nr);