kasan: test: avoid corrupting memory via memset
[linux-2.6-microblaze.git] / lib / scatterlist.c
index a597789..627aa84 100644 (file)
@@ -38,7 +38,7 @@ EXPORT_SYMBOL(sg_next);
  * @sg:                The scatterlist
  *
  * Description:
- * Allows to know how many entries are in sg, taking into acount
+ * Allows to know how many entries are in sg, taking into account
  * chaining as well
  *
  **/
@@ -59,7 +59,7 @@ EXPORT_SYMBOL(sg_nents);
  *
  * Description:
  * Determines the number of entries in sg that are required to meet
- * the supplied length, taking into acount chaining as well
+ * the supplied length, taking into account chaining as well
  *
  * Returns:
  *   the number of sg entries needed, negative error on failure
@@ -887,9 +887,8 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
                miter->__offset += miter->consumed;
                miter->__remaining -= miter->consumed;
 
-               if ((miter->__flags & SG_MITER_TO_SG) &&
-                   !PageSlab(miter->page))
-                       flush_kernel_dcache_page(miter->page);
+               if (miter->__flags & SG_MITER_TO_SG)
+                       flush_dcache_page(miter->page);
 
                if (miter->__flags & SG_MITER_ATOMIC) {
                        WARN_ON_ONCE(preemptible());