Commit 6dd4423f authored by Pankaj Raghav's avatar Pankaj Raghav Committed by Jens Axboe
Browse files

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: 786bb024 ("brd: use XArray instead of radix-tree to index backing pages")
Suggested-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarPankaj Raghav <p.raghav@samsung.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20230614133538.1279369-1-p.raghav@samsung.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 30654614
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);