arm: define __PAGETABLE_PMD_FOLDED for !LPAE
[linux-2.6-block.git] / mm / page_counter.c
index a009574fbba9976bce5cdb05c096a008055388a4..11b4beda14ba9963f5799c6b6638d8a170bd8878 100644 (file)
@@ -166,18 +166,19 @@ int page_counter_limit(struct page_counter *counter, unsigned long limit)
 /**
  * page_counter_memparse - memparse() for page counter limits
  * @buf: string to parse
+ * @max: string meaning maximum possible value
  * @nr_pages: returns the result in number of pages
  *
  * Returns -EINVAL, or 0 and @nr_pages on success.  @nr_pages will be
  * limited to %PAGE_COUNTER_MAX.
  */
-int page_counter_memparse(const char *buf, unsigned long *nr_pages)
+int page_counter_memparse(const char *buf, const char *max,
+                         unsigned long *nr_pages)
 {
-       char unlimited[] = "-1";
        char *end;
        u64 bytes;
 
-       if (!strncmp(buf, unlimited, sizeof(unlimited))) {
+       if (!strcmp(buf, max)) {
                *nr_pages = PAGE_COUNTER_MAX;
                return 0;
        }