SUNRPC: Allow RPCs to fail quickly if the server is unreachable
[safe/jmp/linux-2.6] / net / netfilter / xt_hashlimit.c
index a5b5369..dd16e40 100644 (file)
@@ -194,9 +194,9 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, u_int8_t family)
        if (minfo->cfg.size)
                size = minfo->cfg.size;
        else {
-               size = ((num_physpages << PAGE_SHIFT) / 16384) /
+               size = ((totalram_pages << PAGE_SHIFT) / 16384) /
                       sizeof(struct list_head);
-               if (num_physpages > (1024 * 1024 * 1024 / PAGE_SIZE))
+               if (totalram_pages > (1024 * 1024 * 1024 / PAGE_SIZE))
                        size = 8192;
                if (size < 16)
                        size = 16;
@@ -266,9 +266,9 @@ static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, u_int8_t family)
        if (minfo->cfg.size) {
                size = minfo->cfg.size;
        } else {
-               size = (num_physpages << PAGE_SHIFT) / 16384 /
+               size = (totalram_pages << PAGE_SHIFT) / 16384 /
                       sizeof(struct list_head);
-               if (num_physpages > 1024 * 1024 * 1024 / PAGE_SIZE)
+               if (totalram_pages > 1024 * 1024 * 1024 / PAGE_SIZE)
                        size = 8192;
                if (size < 16)
                        size = 16;
@@ -926,7 +926,7 @@ static int dl_seq_show(struct seq_file *s, void *v)
        if (!hlist_empty(&htable->hash[*bucket])) {
                hlist_for_each_entry(ent, pos, &htable->hash[*bucket], node)
                        if (dl_seq_real_show(ent, htable->family, s))
-                               return 1;
+                               return -1;
        }
        return 0;
 }