]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/readahead.c:do_readhead(): don't check for ->readpage
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 5 Nov 2013 05:55:14 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:14 +0000 (16:55 +1100)
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>
mm/readahead.c

index e4ed04149785f069b201cd2ffaa9caa90c4b0d22..50241836fe82d8d986e458172f13d8d8f2bb2f62 100644 (file)
@@ -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);