aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Stancek <jstancek@redhat.com>2012-09-06 13:11:38 +0200
committerEric B Munson <emunson@mgebm.net>2012-09-06 21:39:54 -0400
commit97a6efd9d0c660d4bdabdb579635c46c3f20e156 (patch)
treef1c630fe16ec34074f9f1cdb58576e7b800db320
parent4f5a61606afe6911bd15f1f0645a2240eafbf7ed (diff)
downloadlibhugetlbfs-97a6efd9d0c660d4bdabdb579635c46c3f20e156.tar.gz
ignore return value from readahead()
do_readahead() requires a_ops->readpage to be != NULL: 568 static ssize_t 569 do_readahead(struct address_space *mapping, struct file *filp, 570 pgoff_t index, unsigned long nr) 571 { 572 if (!mapping || !mapping->a_ops || !mapping->a_ops->readpage) 573 return -EINVAL; 574 575 force_page_cache_readahead(mapping, filp, index, nr); 576 return 0; 577 } but following commit removed readpage from hugetlbfs: commit f2deae9d4e70793568ef9e85d227abb7bef5b622 Author: Mel Gorman <mel@csn.ul.ie> Date: Wed May 13 15:56:10 2009 +0100 Remove implementation of readpage from the hugetlbfs_aops So this is going to always return EINVAL on patched kernels. Ignore return value, regardless of readahead() outcome testcase will still check if reservation counter gets corrupted. Signed-off-by: Jan Stancek <jstancek@redhat.com> Signed-off-by: Eric B Munson <emunson@mgebm.net>
-rw-r--r--tests/readahead_reserve.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/readahead_reserve.c b/tests/readahead_reserve.c
index d0a478b..068b6f4 100644
--- a/tests/readahead_reserve.c
+++ b/tests/readahead_reserve.c
@@ -64,8 +64,7 @@ int main(int argc, char *argv[])
verbose_printf("Reserve count after map: %lu\n", map_rsvd);
/* readahead the region and record reservations */
- if (readahead(fd, 0, hpage_size) == -1)
- FAIL("readahead(): %s", strerror(errno));
+ readahead(fd, 0, hpage_size);
readahead_rsvd = get_huge_page_counter(hpage_size, HUGEPAGES_RSVD);
verbose_printf("Reserve count after readahead: %lu\n", readahead_rsvd);