• M
    ovl: fix remove/copy-up race · a105d685
    Miklos Szeredi 提交于
    ovl_remove_and_whiteout() needs to check if upper dentry exists or not
    after having locked upper parent directory.
    
    Previously we used a "type" value computed before locking the upper parent
    directory, which is susceptible to racing with copy-up.
    
    There's a similar check in ovl_check_empty_and_clear().  This one is not
    actually racy, since copy-up doesn't change the "emptyness" property of a
    directory.  Add a comment to this effect, and check the existence of upper
    dentry locally to make the code cleaner.
    Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
    a105d685
dir.c 21.0 KB