Whamcloud - gitweb
LU-6245 libcfs: remove mem wrappers for libcfs
[fs/lustre-release.git] / lustre / osc / osc_request.c
index d0fa025..f841014 100644 (file)
@@ -931,7 +931,7 @@ static void handle_short_read(int nob_read, size_t page_count,
                if (pga[i]->count > nob_read) {
                        /* EOF inside this page */
                        ptr = kmap(pga[i]->pg) +
-                               (pga[i]->off & ~CFS_PAGE_MASK);
+                               (pga[i]->off & ~PAGE_MASK);
                        memset(ptr + nob_read, 0, pga[i]->count - nob_read);
                        kunmap(pga[i]->pg);
                        page_count--;
@@ -946,7 +946,7 @@ static void handle_short_read(int nob_read, size_t page_count,
 
        /* zero remaining pages */
        while (page_count-- > 0) {
-               ptr = kmap(pga[i]->pg) + (pga[i]->off & ~CFS_PAGE_MASK);
+               ptr = kmap(pga[i]->pg) + (pga[i]->off & ~PAGE_MASK);
                memset(ptr, 0, pga[i]->count);
                kunmap(pga[i]->pg);
                i++;
@@ -1037,16 +1037,16 @@ static u32 osc_checksum_bulk(int nob, size_t pg_count,
                if (i == 0 && opc == OST_READ &&
                    OBD_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_RECEIVE)) {
                        unsigned char *ptr = kmap(pga[i]->pg);
-                       int off = pga[i]->off & ~CFS_PAGE_MASK;
+                       int off = pga[i]->off & ~PAGE_MASK;
 
                        memcpy(ptr + off, "bad1", min_t(typeof(nob), 4, nob));
                        kunmap(pga[i]->pg);
                }
                cfs_crypto_hash_update_page(hdesc, pga[i]->pg,
-                                           pga[i]->off & ~CFS_PAGE_MASK,
+                                           pga[i]->off & ~PAGE_MASK,
                                            count);
                LL_CDEBUG_PAGE(D_PAGE, pga[i]->pg, "off %d\n",
-                              (int)(pga[i]->off & ~CFS_PAGE_MASK));
+                              (int)(pga[i]->off & ~PAGE_MASK));
 
                nob -= pga[i]->count;
                pg_count--;
@@ -1151,7 +1151,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
        pg_prev = pga[0];
         for (requested_nob = i = 0; i < page_count; i++, niobuf++) {
                 struct brw_page *pg = pga[i];
-                int poff = pg->off & ~CFS_PAGE_MASK;
+               int poff = pg->off & ~PAGE_MASK;
 
                 LASSERT(pg->count > 0);
                 /* make sure there is no gap in the middle of page array */
@@ -2095,8 +2095,8 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
 
         /* Filesystem lock extents are extended to page boundaries so that
          * dealing with the page cache is a little smoother.  */
-        policy->l_extent.start -= policy->l_extent.start & ~CFS_PAGE_MASK;
-        policy->l_extent.end |= ~CFS_PAGE_MASK;
+       policy->l_extent.start -= policy->l_extent.start & ~PAGE_MASK;
+       policy->l_extent.end |= ~PAGE_MASK;
 
         /*
          * kms is not valid when either object is completely fresh (so that no
@@ -2237,8 +2237,8 @@ int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
 
         /* Filesystem lock extents are extended to page boundaries so that
          * dealing with the page cache is a little smoother */
-        policy->l_extent.start -= policy->l_extent.start & ~CFS_PAGE_MASK;
-        policy->l_extent.end |= ~CFS_PAGE_MASK;
+       policy->l_extent.start -= policy->l_extent.start & ~PAGE_MASK;
+       policy->l_extent.end |= ~PAGE_MASK;
 
         /* Next, search for already existing extent locks that will cover us */
         /* If we're trying to read, we also search for an existing PW lock.  The