• J
    fsnotify: Lock object list with connector lock · 04662cab
    Jan Kara 提交于
    So far list of marks attached to an object (inode / vfsmount) was
    protected by i_lock or mnt_root->d_lock. This dictates that the list
    must be empty before the object can be destroyed although the list is
    now anchored in the fsnotify_mark_connector structure. Protect the list
    by a spinlock in the fsnotify_mark_connector structure to decouple
    lifetime of a list of marks from a lifetime of the object. This also
    simplifies the code quite a bit since we don't have to differentiate
    between inode and vfsmount lists in quite a few places anymore.
    Reviewed-by: NMiklos Szeredi <mszeredi@redhat.com>
    Reviewed-by: NAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: NJan Kara <jack@suse.cz>
    04662cab
fsnotify_backend.h 16.6 KB