From: Pankaj Raghav
Date: Wed, 14 Jun 2023 13:35:38 +0000 (+0200)
Subject: brd: use cond_resched instead of cond_resched_rcu
X-Git-Tag: v6.6.7~2487^2~43
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dd4423f3f247b6f0ecb828cf62ea2bc4604f0b5;p=platform%2Fkernel%2Flinux-starfive.git
brd: use cond_resched instead of cond_resched_rcu
The body of the loop is run without RCU lock held. Use the regular
cond_resched() instead of cond_resched_rcu().
Fixes: 786bb0245881 ("brd: use XArray instead of radix-tree to index backing pages")
Suggested-by: Matthew Wilcox (Oracle)
Signed-off-by: Pankaj Raghav
Reviewed-by: Hannes Reinecke
Link: https://lore.kernel.org/r/20230614133538.1279369-1-p.raghav@samsung.com
Signed-off-by: Jens Axboe
---
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 2f71376..970bd6f 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -111,7 +111,7 @@ static void brd_free_pages(struct brd_device *brd)
xa_for_each(&brd->brd_pages, idx, page) {
__free_page(page);
- cond_resched_rcu();
+ cond_resched();
}
xa_destroy(&brd->brd_pages);