aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-09-01 12:48:13 +1000
committerNeilBrown <neilb@suse.de>2008-09-01 12:48:13 +1000
commitb2d2c4ceaddc3098f19637a732f74b820a81a9e7 (patch)
tree5fb4150c33066f9fa70cc39853e5400ad6d54dca /include
parent271f5a9b8f8ae0db95de72779d115c9d0b9d3cc5 (diff)
Fix problem with waiting while holding rcu read lock in md/bitmap.c
A recent patch to protect the rdev list with rcu locking leaves us with a problem because we can sleep on memalloc while holding the rcu lock. The rcu lock is only needed while walking the linked list as uninteresting devices (failed or spares) can be removed at any time. So only take the rcu lock while actually walking the linked list. Take a refcount on the rdev during the time when we drop the lock and do the memalloc to start IO. When we return to the locked code, all the interesting devices on the list will not have moved, so we can simply use list_for_each_continue_rcu to pick up where we left off. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions