Skip to content

Commit

Permalink
mm/readahead.c:do_readhead(): don't check for ->readpage
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Nov 13, 2013
1 parent 41ecc34 commit 63d0f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/readahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 63d0f0a

Please sign in to comment.