aboutsummaryrefslogtreecommitdiffstats
path: root/lib/scatterlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scatterlist.c')
-rw-r--r--lib/scatterlist.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index fadae774a20c..e76d85cf3175 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -404,14 +404,13 @@ EXPORT_SYMBOL(sg_miter_start);
404 * @miter: sg mapping iter to proceed 404 * @miter: sg mapping iter to proceed
405 * 405 *
406 * Description: 406 * Description:
407 * Proceeds @miter@ to the next mapping. @miter@ should have been 407 * Proceeds @miter to the next mapping. @miter should have been started
408 * started using sg_miter_start(). On successful return, 408 * using sg_miter_start(). On successful return, @miter->page,
409 * @miter@->page, @miter@->addr and @miter@->length point to the 409 * @miter->addr and @miter->length point to the current mapping.
410 * current mapping.
411 * 410 *
412 * Context: 411 * Context:
413 * IRQ disabled if SG_MITER_ATOMIC. IRQ must stay disabled till 412 * Preemption disabled if SG_MITER_ATOMIC. Preemption must stay disabled
414 * @miter@ is stopped. May sleep if !SG_MITER_ATOMIC. 413 * till @miter is stopped. May sleep if !SG_MITER_ATOMIC.
415 * 414 *
416 * Returns: 415 * Returns:
417 * true if @miter contains the next mapping. false if end of sg 416 * true if @miter contains the next mapping. false if end of sg
@@ -465,7 +464,8 @@ EXPORT_SYMBOL(sg_miter_next);
465 * resources (kmap) need to be released during iteration. 464 * resources (kmap) need to be released during iteration.
466 * 465 *
467 * Context: 466 * Context:
468 * IRQ disabled if the SG_MITER_ATOMIC is set. Don't care otherwise. 467 * Preemption disabled if the SG_MITER_ATOMIC is set. Don't care
468 * otherwise.
469 */ 469 */
470void sg_miter_stop(struct sg_mapping_iter *miter) 470void sg_miter_stop(struct sg_mapping_iter *miter)
471{ 471{
@@ -479,7 +479,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
479 flush_kernel_dcache_page(miter->page); 479 flush_kernel_dcache_page(miter->page);
480 480
481 if (miter->__flags & SG_MITER_ATOMIC) { 481 if (miter->__flags & SG_MITER_ATOMIC) {
482 WARN_ON(!irqs_disabled()); 482 WARN_ON_ONCE(preemptible());
483 kunmap_atomic(miter->addr); 483 kunmap_atomic(miter->addr);
484 } else 484 } else
485 kunmap(miter->page); 485 kunmap(miter->page);