• Latchesar Ionkov's avatar
    [PATCH] v9fs: fix races in fid allocation · 0b8dd177
    Latchesar Ionkov authored
    Fid management cleanup.  The patch attempts to fix the races in dentry's
    fid management.
    
    Dentries don't keep the opened fids anymore, they are moved to the file
    structs.  Ideally there should be no more than one fid with fidcreate equal
    to zero in the dentry's list of fids.
    
    v9fs_fid_create initializes the important fields (fid, fidcreated) before
    v9fs_fid is added to the list.  v9fs_fid_lookup returns only fids that are
    not created by v9fs_create.  v9fs_fid_get_created returns the fid created
    by the same process by v9fs_create (if any) and removes it from dentry's
    list
    Signed-off-by: default avatarLatchesar Ionkov <lucho@ionkov.net>
    Cc: Eric Van Hensbergen <ericvh@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    0b8dd177
vfs_dentry.c 3.42 KB