]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - lib/scatterlist.c
Merge branch 'for-3.7/core' of git://git.kernel.dk/linux-block
[linux-imx.git] / lib / scatterlist.c
index 8cd2ced68f36f3d2c37fad2fba75904374145297..3675452b23ca175b612489e362aa7274b75d96a5 100644 (file)
@@ -423,14 +423,13 @@ EXPORT_SYMBOL(sg_miter_start);
  * @miter: sg mapping iter to proceed
  *
  * Description:
- *   Proceeds @miter@ to the next mapping.  @miter@ should have been
- *   started using sg_miter_start().  On successful return,
- *   @miter@->page, @miter@->addr and @miter@->length point to the
- *   current mapping.
+ *   Proceeds @miter to the next mapping.  @miter should have been started
+ *   using sg_miter_start().  On successful return, @miter->page,
+ *   @miter->addr and @miter->length point to the current mapping.
  *
  * Context:
- *   IRQ disabled if SG_MITER_ATOMIC.  IRQ must stay disabled till
- *   @miter@ is stopped.  May sleep if !SG_MITER_ATOMIC.
+ *   Preemption disabled if SG_MITER_ATOMIC.  Preemption must stay disabled
+ *   till @miter is stopped.  May sleep if !SG_MITER_ATOMIC.
  *
  * Returns:
  *   true if @miter contains the next mapping.  false if end of sg
@@ -484,7 +483,8 @@ EXPORT_SYMBOL(sg_miter_next);
  *   resources (kmap) need to be released during iteration.
  *
  * Context:
- *   IRQ disabled if the SG_MITER_ATOMIC is set.  Don't care otherwise.
+ *   Preemption disabled if the SG_MITER_ATOMIC is set.  Don't care
+ *   otherwise.
  */
 void sg_miter_stop(struct sg_mapping_iter *miter)
 {
@@ -498,7 +498,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
                        flush_kernel_dcache_page(miter->page);
 
                if (miter->__flags & SG_MITER_ATOMIC) {
-                       WARN_ON(!irqs_disabled());
+                       WARN_ON_ONCE(preemptible());
                        kunmap_atomic(miter->addr);
                } else
                        kunmap(miter->page);