• D
    btrfs: dev_alloc_list is not protected by RCU, use normal list_del · 619c47f3
    David Sterba 提交于
    The dev_alloc_list list could be protected by various mutexes,
    depending on the context. The list tracks devices that can take part of
    allocating new chunks, so the closest mutex is chunk_mutex. Adding a new
    device from inside the ADD_DEV ioctl will need device_list_mutex and
    registering a new device from the ioctl needs uuid_mutex.
    
    All mutexes naturally guarantee exclusivity against the same context.
    The device ownership can move between the contexts and the exclusivity
    is guaranteed by other means, eg. during the mount with the uuid_mutex.
    
    There's no RCU involved for dev_alloc_list.
    Signed-off-by: NDavid Sterba <dsterba@suse.com>
    619c47f3
volumes.c 187.9 KB