Whamcloud - gitweb
LU-5396 llite: make some functions static
[fs/lustre-release.git] / lustre / llite / lproc_llite.c
index 18f80d1..a622863 100644 (file)
@@ -47,9 +47,9 @@ struct proc_dir_entry *proc_lustre_fs_root;
 
 #ifdef LPROCFS
 /* /proc/lustre/llite mount point registration */
-struct file_operations ll_rw_extents_stats_fops;
-struct file_operations ll_rw_extents_stats_pp_fops;
-struct file_operations ll_rw_offset_stats_fops;
+static const struct file_operations ll_rw_extents_stats_fops;
+static const struct file_operations ll_rw_extents_stats_pp_fops;
+static const struct file_operations ll_rw_offset_stats_fops;
 
 static int ll_blksize_seq_show(struct seq_file *m, void *v)
 {
@@ -451,6 +451,8 @@ ll_max_cached_mb_seq_write(struct file *file, const char __user *buffer,
                       totalram_pages >> (20 - PAGE_CACHE_SHIFT));
                RETURN(-ERANGE);
        }
+       /* Allow enough cache so clients can make well-formed RPCs */
+       pages_number = max_t(long, pages_number, PTLRPC_MAX_BRW_PAGES);
 
        spin_lock(&sbi->ll_lock);
        diff = pages_number - cache->ccc_lru_max;