Whamcloud - gitweb
LU-8560 libcfs: handle PAGE_CACHE_* removal in newer kernels
[fs/lustre-release.git] / lustre / ptlrpc / lproc_ptlrpc.c
index 61a6136..05f8fcb 100644 (file)
@@ -310,8 +310,8 @@ ptlrpc_lprocfs_req_history_max_seq_write(struct file *file,
        /* This sanity check is more of an insanity check; we can still
         * hose a kernel by allowing the request history to grow too
         * far. */
-       bufpages = (svc->srv_buf_size + PAGE_CACHE_SIZE - 1) >>
-                                                       PAGE_CACHE_SHIFT;
+       bufpages = (svc->srv_buf_size + PAGE_SIZE - 1) >>
+                                                       PAGE_SHIFT;
        if (val > totalram_pages/(2 * bufpages))
                return -ERANGE;
 
@@ -1261,7 +1261,7 @@ lprocfs_import_seq_write(struct file *file, const char __user *buffer,
        const char prefix[] = "connection=";
        const int prefix_len = sizeof(prefix) - 1;
 
-       if (count > PAGE_CACHE_SIZE - 1 || count <= prefix_len)
+       if (count > PAGE_SIZE - 1 || count <= prefix_len)
                return -EINVAL;
 
        OBD_ALLOC(kbuf, count + 1);