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 <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
41ecc34598
commit
63d0f0a3c7
1 changed files with 1 additions and 1 deletions
|
@ -569,7 +569,7 @@ static ssize_t
|
||||||
do_readahead(struct address_space *mapping, struct file *filp,
|
do_readahead(struct address_space *mapping, struct file *filp,
|
||||||
pgoff_t index, unsigned long nr)
|
pgoff_t index, unsigned long nr)
|
||||||
{
|
{
|
||||||
if (!mapping || !mapping->a_ops || !mapping->a_ops->readpage)
|
if (!mapping || !mapping->a_ops)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
force_page_cache_readahead(mapping, filp, index, nr);
|
force_page_cache_readahead(mapping, filp, index, nr);
|
||||||
|
|
Loading…
Reference in a new issue