diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c')
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index 46aad6813cab..acd2619227df 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -38,8 +38,6 @@ #include <linux/sysctl.h> #include <linux/sched.h> #include <linux/mm.h> -#include <linux/sysctl.h> -#include <linux/version.h> #include <linux/proc_fs.h> #include <linux/slab.h> #include <linux/stat.h> @@ -202,12 +200,12 @@ int LL_PROC_PROTO(proc_max_dirty_pages_in_mb) 1 << (20 - PAGE_CACHE_SHIFT)); /* Don't allow them to let dirty pages exceed 90% of system * memory and set a hard minimum of 4MB. */ - if (obd_max_dirty_pages > ((num_physpages / 10) * 9)) { + if (obd_max_dirty_pages > ((totalram_pages / 10) * 9)) { CERROR("Refusing to set max dirty pages to %u, which " "is more than 90%% of available RAM; setting " "to %lu\n", obd_max_dirty_pages, - ((num_physpages / 10) * 9)); - obd_max_dirty_pages = ((num_physpages / 10) * 9); + ((totalram_pages / 10) * 9)); + obd_max_dirty_pages = ((totalram_pages / 10) * 9); } else if (obd_max_dirty_pages < 4 << (20 - PAGE_CACHE_SHIFT)) { obd_max_dirty_pages = 4 << (20 - PAGE_CACHE_SHIFT); } @@ -431,7 +429,7 @@ void obd_sysctl_init (void) { #ifdef CONFIG_SYSCTL if ( !obd_table_header ) - obd_table_header = cfs_register_sysctl_table(parent_table, 0); + obd_table_header = register_sysctl_table(parent_table); #endif } |