Whamcloud - gitweb
LU-8560 libcfs: handle PAGE_CACHE_* removal in newer kernels
[fs/lustre-release.git] / lustre / llite / vvp_io.c
index 2f10ea7..a8469b8 100644 (file)
@@ -179,10 +179,10 @@ static int vvp_prep_size(const struct lu_env *env, struct cl_object *obj,
                                 * --bug 17336 */
                                loff_t size = i_size_read(inode);
                                unsigned long cur_index = start >>
-                                       PAGE_CACHE_SHIFT;
+                                       PAGE_SHIFT;
 
                                if ((size == 0 && cur_index != 0) ||
-                                   (((size - 1) >> PAGE_CACHE_SHIFT) <
+                                   (((size - 1) >> PAGE_SHIFT) <
                                     cur_index))
                                        *exceed = 1;
                        }
@@ -751,7 +751,7 @@ static int vvp_io_read_start(const struct lu_env *env,
        if (!vio->vui_ra_valid) {
                vio->vui_ra_valid = true;
                vio->vui_ra_start = cl_index(obj, pos);
-               vio->vui_ra_count = cl_index(obj, tot + PAGE_CACHE_SIZE - 1);
+               vio->vui_ra_count = cl_index(obj, tot + PAGE_SIZE - 1);
                ll_ras_enter(file);
        }