Messages in this thread | | | Date | Fri, 17 Feb 2012 10:16:34 -0800 | From | Tejun Heo <> | Subject | Re: [PATCH 2/9] blkcg: drop unnecessary RCU locking |
| |
On Fri, Feb 17, 2012 at 01:08:00PM -0500, Vivek Goyal wrote: > > Modifying blkgs require both blkcg and queue locks, > > so read access can be done holding any lock. > > This is the point I am not getting. How blkg_lookup() is safe just > under queue lock. What stops freeing up blkg associated with other > queues. I thought caller needs to hold rcu_read_lock() also to > make sure it can safely compare blkg->q == q and return the blkg > belonging to the queue in question.
Ooh, you're right. I got confused. We should be holding either blkcg lock or rcu_read_lock() across blkg_lookup(). Will update.
Thanks.
-- tejun
| |