Skip to content

Commit 6dd4423

Browse files
Panky-codesaxboe
authored andcommitted
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: 786bb02 ("brd: use XArray instead of radix-tree to index backing pages") Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20230614133538.1279369-1-p.raghav@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 3065461 commit 6dd4423

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/brd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static void brd_free_pages(struct brd_device *brd)
111111

112112
xa_for_each(&brd->brd_pages, idx, page) {
113113
__free_page(page);
114-
cond_resched_rcu();
114+
cond_resched();
115115
}
116116

117117
xa_destroy(&brd->brd_pages);

0 commit comments

Comments
 (0)